The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientCardView.FocusedCardChanged Event

Fires in response to changing card focus.

Declaration

FocusedCardChanged: ASPxClientEvent<ASPxClientCardViewFocusEventHandler<ASPxClientCardView>>

Event Data

The FocusedCardChanged event handler receives an argument of the ASPxClientCardViewFocusEventArgs type. The following properties provide information specific to this event.

Property Description
isChangedOnServer Gets whether card focusing has been changed on the server.
processOnServer Gets or sets a value that specifies whether the event should be finally processed on the server side.

Remarks

The FocusedCardChanged event is raised when an end-user moves focus from one card to another. The focused card's index is returned by the ASPxClientCardView.GetFocusedCardIndex method.

The focused card feature is enabled if the ASPxCardViewBehaviorSettings.AllowFocusedCard property is set to true.

Examples

The ASPxClientCardView.FocusedCardChanged event is handled to call the OnFocusedCardChanged() function. This function queries the server to return the employee details. The returned array is passed to the OnGetRowValues() function that specifies values for corresponding HTML elements.

The image below shows the result:

ASPxCardView_Ex_SingleCardSelection

function OnFocusedCardChanged() {
    cardView.GetCardValues(cardView.GetFocusedCardIndex(), 'FirstName;LastName;HomePhone;Title;Notes', OnGetCardValues);
}
function OnGetCardValues(values) {
    var editors = [FirstName, LastName, Phone, Title, Notes];
    for (var i = 0; i < editors.length; i++) {
        var editor = editors[i];
        editor.SetValue(values[i]);
    }
}
See Also