Skip to main content
Tab

ASPxCheckBoxList.SelectedIndices Property

Gets the collection of the selected items’ indexes within the check box list.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

public SelectedIndexCollection SelectedIndices { get; }

Property Value

Type Description
SelectedIndexCollection

A SelectedIndexCollection object that contains the selected items.

Remarks

Use the SelectedItems, SelectedIndices, or SelectedValues properties to get information about selected items in code behind.

<dx:ASPxCheckBoxList ID="checkBoxList" runat="server">
    <Items>
        <dx:ListEditItem Value="1" />
        <dx:ListEditItem Value="2" />
        <!-- ... -->
    </Items>
</dx:ASPxCheckBoxList>
<dx:ASPxButton runat="server" ID="ClickButton" Text="Click" OnClick="ClickButton_Click" />
protected void ClickButton_Click(object sender, EventArgs e)
{
    var selectedValues = checkBoxList.SelectedValues;
    var selectedItems = checkBoxList.SelectedItems;
    var selectedIndices = checkBoxList.SelectedIndices;
    // ...
}
See Also