ASPxClientCardView.GetCardValues(visibleIndex, fieldNames, onCallback) Method

Returns the values of the specified data source fields within the specified card.


    visibleIndex: number,
    fieldNames: string,
    onCallback: ASPxClientCardViewValuesCallback
): void


Name Type Description
visibleIndex number

An integer value that identifies the data card.

fieldNames string

The names of data source fields separated via a semicolon, whose values within the specified card are returned.

onCallback ASPxClientCardViewValuesCallback

An ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the list of card values as a parameter.


An example can be found in the Focusing Online Demo.


If you pass a single field as a fieldNames parameter to the GetCardValues method, the function passed as the onCallback parameter receives a single value as a parameter, rather than a list of card values.

In this case, your function should work with a single value instead of the list of values. A working example is shown in the code sample below:

// function is called on changing focused card
function OnFocusedCardChanged() {
    // Query the server for the "EmployeeID" field from the focused card
    // The single value will be returned to the OnGetCardValues() function     
    cardView.GetCardValues(cardView.GetFocusedCardIndex(), 'EmployeeID', OnGetCardValues);
// Value contains the "EmployeeID" field value returned from the server, not the list of values
function OnGetCardValues(Value) {
    // Right code
    // This code will cause an error
    // alert(Value[0]);
See Also