Skip to main content

ASPxClientGridView.SelectRowOnPage(visibleIndex) Method

Selects or deselects the row specified by its visible index.

Declaration

SelectRowOnPage(
    visibleIndex: number,
    selected?: boolean
): void

Parameters

Name Type Description
visibleIndex number

The row’s visible index.

selected boolean

true or undefined to select the specified row; false to deselect the row.

Remarks

Pass the row’s visible index as a parameter to the SelectRowOnPage(visibleIndex) method to select or deselect the corresponding row.

When the row selection changes, the control raises the client-side ASPxClientGridView.SelectionChanged or the server-side ASPxGridBase.SelectionChanged event (based on the ProcessSelectionChangedOnServer property value).

<dx:ASPxGridView ClientInstanceName="grid" runat="server">
    <%--...--%>
</dx:ASPxGridView>
// Selects the 1st row
grid.SelectRowOnPage(0);

// Selects the 3rd row
grid.SelectRowOnPage(2, true);

// Deselects the 1st row
grid.SelectRowOnPage(0, false);

You can call the SelectAllRowsOnPage method to select all rows within the current page.

See Also