Skip to main content

ASPxCardView.FocusedCardIndex Property

Specifies the focused card.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


public int FocusedCardIndex { get; set; }

Property Value

Type Description

The card index.



Set the ASPxCardViewBehaviorSettings.AllowFocusedCard property to true to allow users to focus cards in the ASPxCardView.

The FocusedCardIndex property specifies the currently focused card. Set this property to a new value to move focus to a card with the specified index on the current page. To focus the card on the required page, switch to this page and then move card focus as described in the example below:

protected void Button1_Click(object sender, EventArgs e)
    // Gets the visible index of the required card.
    int cardIndex = ASPxCardView1.FindVisibleIndexByKeyValue("OLDWO");
    if (cardIndex == ASPxCardView.InvalidCardIndex) return;
    if (!IsCardVisibleOnScreen(cardIndex)) {
        // Switches to the page that contains the required card.
    // Focuses the card with the specified index.
    ASPxCardView1.FocusedCardIndex = cardIndex;

bool IsCardVisibleOnScreen(int cardIndex)
    int startIndex = ASPxCardView1.PageIndex * ASPxCardView1.SettingsPager.PageSize;
    int endIndex = startIndex + ASPxCardView1.SettingsPager.PageSize;
    return cardIndex >= startIndex && cardIndex < endIndex;
void GoToPage(int cardIndex)
    ASPxCardView1.PageIndex = cardIndex / ASPxCardView1.SettingsPager.PageSize;


Focused Cards

Online Demo

ASPxCardView - Focused Cards

See Also