Skip to main content

ASPxClientGridView.FocusedRowChanged Event

Fires in response to changing row focus.

Declaration

FocusedRowChanged: ASPxClientEvent<ASPxClientGridViewFocusEventHandler<ASPxClientGridView>>

Event Data

The FocusedRowChanged event's data class is ASPxClientGridViewFocusEventArgs. The following properties provide information specific to this event:

Property Description
isChangedOnServer Gets whether the row focusing has been changed on the server.
processOnServer Specifies whether or not to process the event on the server. Inherited from ASPxClientProcessingModeEventArgs.

Remarks

The FocusedRowChanged event is raised when an end-user moves focus from one row to another. The focused row’s index is returned by the ASPxClientGridView.GetFocusedRowIndex method.

The focused row feature is enabled if the ASPxGridViewBehaviorSettings.AllowFocusedRow property is set to true.

Example

This example illustrates how to dynamically display a focused employee’s photo and details outside the grid.

Follow the steps below:

  1. Declare the OnGridFocusedRowChanged() function that queries the server to return the employee ID and Notes. This function handles the ASPxClientGridView.FocusedRowChanged event.

  2. Pass the returned array to the OnGetRowValues(values) function that defines values for the corresponding HTML elements.

The image below shows the result:

exSimpleSelection

<dx:ASPxGridView ID="ASPxGridView1" ClientInstanceName="grid">
    <ClientSideEvents FocusedRowChanged="OnGridFocusedRowChanged" />
</dx:ASPxGridView>
See Also