Back to Devexpress

ItemCheckEventArgs.Index Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-itemcheckeventargs.md

latest3.0 KB
Original Source

ItemCheckEventArgs.Index Property

Gets the index of the item whose state was changed.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public int Index { get; protected set; }
vb
Public Property Index As Integer

Property Value

TypeDescription
Int32

An integer value specifying the item’s position in the item collection.

|

Remarks

The Index property specifies the index of the item in the BaseCheckedListBoxControl.Items collection.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Index property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

xaf-how-to-display-a-collection-property-as-a-checked-list-box/CS/DXExample.Module.Win/WinCheckedListBoxPropertyEditor.cs#L41

csharp
void control_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e) {
    object obj = Control.GetItemValue(e.Index);
    switch (e.State) {

xaf-how-to-display-a-collection-property-as-a-checked-list-box/VB/DXExample.Module.Win/WinCheckedListBoxPropertyEditor.vb#L45

vb
Private Sub control_ItemCheck(ByVal sender As Object, ByVal e As DevExpress.XtraEditors.Controls.ItemCheckEventArgs)
    Dim obj As Object = Control.GetItemValue(e.Index)
    Select Case e.State

See Also

State

ItemCheckEventArgs Class

ItemCheckEventArgs Members

DevExpress.XtraEditors.Controls Namespace