Skip to main content
Version: 3.5

ListControl

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Provides a common implementation of members for the ListBox and ComboBox classes.

public class ListControl : Control, IValidation

Properties​

Instance memberAllowHtml​

Boolean: Returns or sets a value indicating that the control can display HTML in the Text property. (Default: False)

Instance memberBorderStyle​

BorderStyle: Returns or sets the type of border that is drawn around the ListControl. (Default: Solid)

Instance memberDataSource​

Object: Returns or sets the data source for this ListControl. (Default: null)

Throws:

Instance memberDisplayMember​

String: Returns or sets the property to display for this ListControl. (Default: "")

Instance memberFormatInfo​

IFormatProvider: Returns or sets the IFormatProvider that provides custom formatting behavior. (Default: null)

Instance memberFormatString​

String: Returns or sets the format-specifier characters that indicate how a value is to be displayed. (Default: "")

Instance memberFormattingEnabled​

Boolean: Returns or sets whether formatting is applied to the DisplayMember property of the ListControl. (Default: False)

Instance memberIconMember​

String: Returns or sets the property to use as the icon for the items in the ListControl. (Default: "")

Instance memberInvalid​

Boolean: Returns or sets a value that indicates that the control is invalid.

Instance memberInvalidMessage​

String: Returns or sets the invalid message that is shown in the invalid tooltip. (Default: "")

Instance memberModified​

Boolean: Returns or sets a value that indicates that the control has been modified by the user since the control was created or its contents were last set.

Instance memberPrefetchItems​

Int32: Returns or sets the number of items to prefetch outside of the visible area when VirtualScroll is set to true. The default is 0 (disabled). (Default: 0)

Instance memberSelectedIndex​

Int32: When overridden in a derived class, gets or sets the zero-based index of the currently selected item.

Instance memberSelectedValue​

Object: Returns or sets the value of the member property specified by the ValueMember property. (Default: null)

Throws:

Instance memberShowToolTips​

Boolean: Returns or sets whether to show tooltips (set using ToolTipMember) for the list items. (Default: False)

Instance memberToolTipMember​

String: Returns or sets the property to use as the tooltip for the items in the ListControl, when the property ShowToolTips is set to true. (Default: "")

Instance memberValueMember​

String: Returns or sets the property to use as the actual value for the items in the ListControl. (Default: "")

Throws:

Instance memberVirtualScroll​

Boolean: Enables or disables virtual scrolling for the ListControl. When virtual scrolling is enabled, only the visible items are rendered in the browser allowing the ListControl to host virtually unlimited items without any performance loss. (Default: False)

When VirtualScroll is set to true, all the items must be of the same height, limiting the more flexible HTML rendering available when VirtualScroll is off (default). Setting the property PrefetchItems to a value greater than 0 allows the virtual view to prefetch the specified number of items outside of the visible area to enable smoother scrolling. Throws:

Methods​

Instance memberAppend(data)​

Populates the ListControl from the data appending the items to the existing items.

ParameterTypeDescription
dataObjectThe object that contains data for the ListControl to display.

Returns: Int32. Numbers of items appended.

Use this method to fill a ListControl without binding it to the data source.

Instance memberFill(data)​

Populates the ListControl from the data .

ParameterTypeDescription
dataObjectThe object that contains data for the ListControl to display.

Returns: Int32. Numbers of items added.

Use this method to fill a ListControl without binding it to the data source.

Instance memberGetItemIcon(item)​

Returns the icon object, either an instance of Image or a String representing the icon name or URL, of the specified item.

ParameterTypeDescription
itemObjectThe object from which to get the icon to display for the list item.

Returns: Object. If the IconMember property is not specified, the value returned by GetItemIcon is null. Otherwise, the method returns the object value of the member specified in the IconMember property for the object specified in the item parameter.

Instance memberGetItemText(item)​

Returns the text representation of the specified item.

ParameterTypeDescription
itemObjectThe object from which to get the contents to display.

Returns: String. If the DisplayMember property is not specified, the value returned by GetItemText is the value of the item's ToString method. Otherwise, the method returns the string value of the member specified in the DisplayMember property for the object specified in the item parameter.

Instance memberGetItemToolTip(item)​

Returns the tooltip text related to the object.

ParameterTypeDescription
itemObjectThe object from which to get the tooltip text to display for the list item.

Returns: String. If the ToolTipMember property is not specified, the value returned by GetItemToolTip is null. Otherwise, the method returns the value of the member specified in the ToolTipMember property for the object specified in the item parameter.

Events​

Instance memberDataSourceChanged​

EventHandler Fired when the DataSource changes.

Instance memberDisplayMemberChanged​

EventHandler Fired when the DisplayMember property changes.

Instance memberFormat​

ListControlConvertEventHandler Fired when the control is bound to a data value.

Instance memberFormatInfoChanged​

EventHandler Fired when the value of the FormatInfo property changes.

Instance memberFormatStringChanged​

EventHandler Fired when value of the FormatString property changes.

Instance memberFormattingEnabledChanged​

EventHandler Fired when the value of the FormattingEnabled property changes.

Instance memberIconMemberChanged​

EventHandler Fired when the IconMember property changes.

Instance memberModifiedChanged​

EventHandler Fired when the value of the Modified property has changed.

Instance memberSelectedValueChanged​

EventHandler Fired when the SelectedValue property changes.

Instance memberToolTipMemberChanged​

EventHandler Fired when the ToolTipMember property changes.

Instance memberValueMemberChanged​

EventHandler Fired when the ValueMember property changes.

Inherited By​

NameDescription
CheckedListBoxDisplays a ListBox in which a check box is displayed to the left of each item.
ComboBoxRepresents a combo box control.
ListBoxRepresents a control to display a list of items.
DataGridViewComboBoxEditingControlRepresents a ComboBox control that can be hosted in a DataGridViewComboBoxCell.
ListViewComboBoxThe TreeViewComboBox control represents a UserComboBox control with a ListView as the drop down panel.
TreeViewComboBoxThe TreeViewComboBox control represents a UserComboBox control with a TreeView as the drop down panel.
UserComboBoxThe UserComboBox control represents a ComboBox control with a custom panel that drops down when the user clicks the down arrow.

Implements​

NameDescription
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
IValidationProvides access to the validation events and properties property for controls that support validation.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.