ListControl

Wisej.Web.ListControl

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

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

public class ListControl : Control

Properties

AllowHtml

Booleanarrow-up-right: Returns or sets a value indicating that the control can display html in the Text property.

BorderStyle

BorderStyle: Returns or sets the type of border that is drawn around the ListControl.

DataSource

Objectarrow-up-right: Returns or sets the data source for this ListControl.

Throws:

DisplayMember

Stringarrow-up-right: Returns or sets the property to display for this ListControl.

FormatInfo

IFormatProviderarrow-up-right: Returns or sets the IFormatProviderarrow-up-right that provides custom formatting behavior.

FormatString

Stringarrow-up-right: Returns or sets the format-specifier characters that indicate how a value is to be displayed.

FormattingEnabled

Booleanarrow-up-right: Returns or sets whether formatting is applied to the DisplayMember property of the ListControl.

IconMember

Stringarrow-up-right: Returns or sets the property to use as the icon for the items in the ListControl.

Invalid

Booleanarrow-up-right: Returns or sets a value that indicates that the control is invalid.

InvalidMessage

Stringarrow-up-right: Returns or sets the invalid message that is shown in the invalid tooltip.

Modified

Booleanarrow-up-right: 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.

PrefetchItems

Int32arrow-up-right: 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).

SelectedIndex

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

SelectedValue

Objectarrow-up-right: Returns or sets the value of the member property specified by the ValueMember property.

Throws:

ShowToolTips

Booleanarrow-up-right: Returns or sets whether to show tooltips (set using ToolTipMember) for the list items.

ToolTipMember

Stringarrow-up-right: Returns or sets the property to use as the tooltip for the items in the ListControl, when the property ShowToolTips is set to true.

ValueMember

Stringarrow-up-right: Returns or sets the property to use as the actual value for the items in the ListControl.

Throws:

VirtualScroll

Booleanarrow-up-right: 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.

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.

Methods

Append(data)

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

Parameter
Type
Description

data

The object that contains data for the ListControl to display.

Returns: Int32arrow-up-right. Numbers of items appended.

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

Fill(data)

Populates the ListControl from the data .

Parameter
Type
Description

data

The object that contains data for the ListControl to display.

Returns: Int32arrow-up-right. Numbers of items added.

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

GetItemIcon(item)

Returns the icon object, either an instance of Imagearrow-up-right or a Stringarrow-up-right representing the icon name or URL, of the specified item.

Parameter
Type
Description

item

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

Returns: Objectarrow-up-right. 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.

GetItemText(item)

Returns the text representation of the specified item.

Parameter
Type
Description

item

The object from which to get the contents to display.

Returns: Stringarrow-up-right. 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.

GetItemToolTip(item)

Returns the tooltip text related to the object.

Parameter
Type
Description

item

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

Returns: Stringarrow-up-right. 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

DataSourceChanged

EventHandlerarrow-up-right Fired when the DataSource changes.

DisplayMemberChanged

EventHandlerarrow-up-right Fired when the DisplayMember property changes.

Format

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

FormatInfoChanged

EventHandlerarrow-up-right Fired when the value of the FormatInfo property changes.

FormatStringChanged

EventHandlerarrow-up-right Fired when value of the FormatString property changes.

FormattingEnabledChanged

EventHandlerarrow-up-right Fired when the value of the FormattingEnabled property changes.

IconMemberChanged

EventHandlerarrow-up-right Fired when the IconMember property changes.

ModifiedChanged

EventHandlerarrow-up-right Fired when the value of the Modified property has changed.

SelectedValueChanged

EventHandlerarrow-up-right Fired when the SelectedValue property changes.

ToolTipMemberChanged

EventHandlerarrow-up-right Fired when the ToolTipMember property changes.

ValueMemberChanged

EventHandlerarrow-up-right Fired when the ValueMember property changes.

Inherited By

Name
Description

Displays a ListBox in which a check box is displayed to the left of each item.

Represents a combo box control.

Represents a control to display a list of items.

Represents a ComboBox control that can be hosted in a DataGridViewComboBoxCell.

The TreeViewComboBox control represents a UserComboBox control with a ListView as the drop down panel.

The TreeViewComboBox control represents a UserComboBox control with a TreeView as the drop down panel.

The UserComboBox control represents a ComboBox control with a custom panel that drops down when the user clicks the down arrow.

Implements

Name
Description

Bindable components implement this interface.

All wisej components implement this interface.

All wisej controls derived from the Control class must implement this interface.

Allows an object to serialize itself.

Last updated

Was this helpful?