ASPxClientCardView.GetCardValues(visibleIndex, fieldNames, onCallback) Method
Returns the values of the specified data source fields within the specified card.
#Declaration
GetCardValues(
visibleIndex: number,
fieldNames: string,
onCallback: ASPxClientCardViewValuesCallback
): void
#Parameters
Name | Type | Description |
---|---|---|
visible |
number | The card’s visible index. |
field |
string | The names of data source fields separated via a semicolon, whose values within the specified card are returned. |
on |
ASPx |
An ASPx |
#Remarks
An example can be found in the Focusing Online Demo.
Note
If you pass a single field as a field
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
alert(Value);
// This code will cause an error
// alert(Value[0]);
}