Skip to main content
A newer version of this page is available. .

CardViewSelection.UnselectCardByKey(Object) Method

Unselects the specified card within the ASPxCardView.

Namespace: DevExpress.Web.Data

Assembly: DevExpress.Web.v19.1.dll

Declaration

public void UnselectCardByKey(
    object keyValue
)

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