Skip to main content

ASPxClientGridView.IsRowSelectedOnPage(visibleIndex) Method

Indicates whether the specified row is selected.

Declaration

IsRowSelectedOnPage(
    visibleIndex: number
): boolean

Parameters

Name Type Description
visibleIndex number

The row’s visible index.

Returns

Type Description
boolean

true if the specified row is selected on the current page; otherwise, false.

Remarks

For more information on row selection in the grid, refer to the following topic: Selection.

The code sample below gets the current selection state of the row with the specified visible index and changes it.

<dx:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server">
</dx:ASPxGridView>
<dx:ASPxButton ID="Button" runat="server" Text="Change selection state" AutoPostBack="false">
    <ClientSideEvents Click="ChangeSelectionState" />
</dx:ASPxButton>
function ChangeSelectionState(s, e) {
    var state = grid.IsRowSelectedOnPage(2);
    grid.SelectRowOnPage(2, !state);
}
See Also