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

ASPxClientCardView.GetSelectedCardCount Method

Returns the number of selected cards.

Declaration

GetSelectedCardCount(): number

Returns

Type Description
number

An integer value that specifies 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. Contact names are obtained using the ASPxClientCardView.GetSelectedFieldValues function.

The image below shows the result:

ASPxCardView_Ex_AdvancedSelection

For more information, see ASPxCardView - Selection online demo.

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