CheckedListBox

Wisej.Web.CheckedListBox

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.0.0)

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

public class CheckedListBox : ListBox

Constructors

CheckedListBox()

Initializes a new instance of the CheckedListBox class.

CheckedListBox(onItemCheck)

Initializes a new instance of the CheckedListBox class.

Name
Type
Description

onItemCheck

Optional ItemCheck handler.

CheckedListBox(dataSource, displayMember, valueMember, iconMember, checkStateMember, onItemCheck)

Initializes a new instance of CheckedListBox class with the specified settings.

Name
Type
Description

dataSource

Initial DataSource.

displayMember

Initial DisplayMember.

valueMember

Initial ValueMember.

iconMember

Initial IconMember.

checkStateMember

onItemCheck

Optional ItemCheck handler.

CheckedListBox(location, size, onItemCheck)

Initializes a new instance of the CheckedListBox class with the specified settings.

Name
Type
Description

location

Initial location.

size

Initial size.

onItemCheck

Optional ItemCheck handler.

CheckedListBox(location, size, dataSource, displayMember, valueMember, iconMember, checkStateMember, onItemCheck)

Initializes a new instance of the CheckedListBox class with the specified settings.

Name
Type
Description

location

Initial location.

size

Initial size.

dataSource

Initial DataSource.

displayMember

Initial DisplayMember.

valueMember

Initial ValueMember.

iconMember

Initial IconMember.

checkStateMember

onItemCheck

Optional ItemCheck handler.

Properties

CheckedIndices

CheckedIndexCollection: Collection of checked indexes in the CheckedListBox.

CheckedItems

CheckedObjectCollection: Collection of checked items in the CheckedListBox.

CheckOnClick

Boolean: Returns or sets whether list items are checked when they are clicked. The default is to check the item when clicking on the checkbox icon. (Default: False)

CheckStateMember

String: Returns or sets the property to bind to the CheckState of the items in the CheckedListBox control. (Default: "")

Items

ObjectCollection: Returns the collection of items in this CheckedListBox.

Separator

String: Returns or sets the separator used to concatenate and parse multiple checked values for the Text property. (Default: ",")

Methods

ClearChecked()

Unchecks all items in the CheckedListBox.

CreateItemCollection()

Creates a new instance of the item collection.

Returns: ObjectCollection. A ObjectCollection that represents the new item collection.

GetItemChecked(index)

Returns a value indicating whether the specified item is checked.

Parameter
Type
Description

index

The index of the item.

Returns: Boolean. true if the item is checked; otherwise, false.

Throws:

  • ArgumentException The index specified is less than zero; or the index specified is greater than or equal to the count of items in the list.

GetItemCheckState(index)

Returns a value indicating the check state of the current item.

Parameter
Type
Description

index

The index of the item to get the checked value of.

Returns: CheckState. One of the CheckState values.

Throws:

  • ArgumentOutOfRangeException The index specified is less than zero; or the index specified is greater than or equal to the count of items in the list.

OnAfterItemCheck(e)

Fires the AfterItemCheck event.

Parameter
Type
Description

e

An ItemCheckEventArgs that contains the event data.

OnCheckStateMemberChanged(e)

Fires the CheckStateMemberChanged event.

Parameter
Type
Description

e

A EventArgs that contains the event data.

OnItemCheck(e)

Fires the ItemCheck event.

Parameter
Type
Description

e

An ItemCheckEventArgs that contains the event data.

OnWebEvent(e)

Processes the event from the client.

Parameter
Type
Description

e

Event arguments.

OnWebRender(config)

Renders the client component.

Parameter
Type
Description

config

Dynamic configuration object.

RefreshItem(index)

Refreshes the item contained at the specified location.

Parameter
Type
Description

index

The location of the item to refresh.

RefreshItems()

Reloads all the CheckedListBox items from the data source.

SetItemChecked(index, value)

Sets CheckState for the item at the specified index to Checked.

Parameter
Type
Description

index

The index of the item to set the check state for.

value

true to set the item as checked; otherwise, false.

Throws:

  • ArgumentException The index specified is less than zero; or the index is greater than the count of items in the list.

SetItemCheckState(index, value)

Sets the check state of the item at the specified index.

Parameter
Type
Description

index

The index of the item to set the state for.

value

One of the CheckState values.

Throws:

  • ArgumentOutOfRangeException The index specified is less than zero; or the index is greater than or equal to the count of items in the list.

SetItemCore(index, value)

Sets the object with the specified index in the derived class.

Parameter
Type
Description

index

The array index of the object.

value

The object.

SetItemsCore(value)

Sets the specified array of objects in a collection in the derived class.

Parameter
Type
Description

value

An array of items.

Events

AfterItemCheck

ItemCheckEventHandler Fired after the checked state of an item changes.

CheckStateMemberChanged

EventHandler Fired when the CheckStateMember property changes.

Click

EventHandler Fired when the user clicks the CheckedListBox control.

ItemCheck

ItemCheckEventHandler Fired when the checked state of an item changes.

MouseClick

MouseEventHandler Fired when the user clicks the CheckedListBox control with the mouse.

Implements

Name
Description

Provides access to the UserData and Tag properties associated to the component implementing this interface.

Bindable components implement this interface.

Controls that support drag & drop operations implement this interface.

Provides access to the LabelWrapper associated with the controls that implement this interface.

Provides access to the ReadOnly property for coontrols that support the read-only mode.

Provides access to the Modified property and ModifiedChanged event for controls that implement this interface.

Provides access to the validation events and properties property for controls that support validation.

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?