CardViewSelection.UnselectCardByKey(Object) Method
Unselects the specified card within the ASPxCardView.
Namespace: DevExpress.Web.Data
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Parameters
Name | Type | Description |
---|---|---|
keyValue | Object | An object that identifies the card by its key value. |
Remarks
The following example shows how to unselect the focused card (if it is selected):
// Checks whether the focused row is displayed within the grid.
if (ASPxGridView1.FocusedRowIndex == -1) return;
// Checks whether the focused row is selected.
if (!ASPxGridView1.Selection.IsRowSelected(ASPxGridView1.FocusedRowIndex)) return;
// Obrains the focused row's key value.
object focusedRowKey = ASPxGridView1.GetRowValues(ASPxGridView1.FocusedRowIndex, ASPxGridView1.KeyFieldName);
// Unselects the focused row.
ASPxGridView1.Selection.UnselectRowByKey(focusedRowKey);
See Also