Skip to main content

ASPxClientGridView.UnselectRowsByKey(keys) Method

Deselects the rows specified by their key values.

Declaration

UnselectRowsByKey(
    keys: any[] | any
): void

Parameters

Name Type Description
keys any

The key values of the rows.

Remarks

The UnselectRowsByKey(keys) method sends a callback to the server to apply the row selection.

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).

To select the rows specified by their key values, call the SelectRowsByKey(keys) method.

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

<dx:ASPxGridView ID="grid" ClientInstanceName="grid" KeyFieldName="ProductID" runat="server">
</dx:ASPxGridView>
// Deselect a single row
grid.UnselectRowsByKey(2);

// Deselect multiple rows
grid.UnselectRowsByKey([2,10]);

Deselect the Row(s) Specified by the Composite Key Value(s)

<dx:ASPxGridView ID="grid" ClientInstanceName="grid" KeyFieldName="ProductID;ProductName" runat="server">
</dx:ASPxGridView>
// Deselect a single row
grid.UnselectRowsByKey("2|Chang");

// Deselect multiple rows
grid.UnselectRowsByKey(["2|Chang","10|Ikura"]);
See Also