Skip to main content

WebDataSelection.SetSelectionByKey(Object, Boolean) Method

Selects or unselects the specified row within the ASPxGridView.

Namespace: DevExpress.Web.Data

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web


public void SetSelectionByKey(
    object keyValue,
    bool selected


Name Type Description
keyValue Object

An object that identifies the data row by its key value.

selected Boolean

true to select the row; otherwise, false.


To identify whether the specified row is selected, use the GridViewSelection.IsRowSelected method.

View Example: How to select/deselect all rows in a group when Grid View data is grouped by one column

See Also