Skip to main content

CardViewSelection.SelectCard(Int32) Method

Selects the specified card within the ASPxCardView.

Namespace: DevExpress.Web.Data

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web


public void SelectCard(
    int visibleIndex


Name Type Description
visibleIndex Int32

An integer value that identifies the card by its visible index.


To unselect the specified card, use the CardViewSelection.UnselectCard method.


The following example selects customers who live in the specified country.

When an end user types the country into the search box and clicks Search, the button editor’s ButtonClick event is handled to call the ASPxClientCardView.PerformCallback method.

This sends a callback to the server and generates the ASPxCardView.CustomCallback event, which passes the “Country” value entered by the user. The CustomCallback event is handled to select the customers who live in the specified country.

protected void ASPxCardView2_CustomCallback(object sender, ASPxCardViewCustomCallbackEventArgs e)
string country = e.Parameters.ToString();
for (int i = 0; i < ASPxCardView2.VisibleCardCount; i++)
    if (ASPxCardView2.GetCardValues(i, "Country") != null)
        if (ASPxCardView2.GetCardValues(i, "Country").ToString() == country)
See Also