Skip to main content

ASPxClientCardView.GetSelectedCardCount Method

Returns the number of selected cards.

Declaration

GetSelectedCardCount(): number

Returns

Type Description
number

The number of selected cards.

Example

In this example, the ASPxClientCardView.SelectionChanged client-side event is handled to display selected contacts within the list box. The ASPxClientCardView.GetSelectedFieldValues function is used to obtain contact names.

The image below shows the result:

ASPxCardView_Ex_AdvancedSelection

For more information, see the following DevExpress ASP.NET Card View demo: ASPxCardView - Selection.

function OnCardSelectionChanged(s, e) {
    s.GetSelectedFieldValues("FirstName;LastName", GetSelectedFieldValuesCallback);
}
function GetSelectedFieldValuesCallback(values) {
    selectionList.BeginUpdate();
    try {
        selectionList.ClearItems();
        for (var i = 0; i < values.length; i++) {
            selectionList.AddItem(values[i].join(' '));
        }
    } finally {
        selectionList.EndUpdate();
    }
    document.getElementById("selCount").innerHTML = cardView.GetSelectedCardCount();
}
See Also