Back to Devexpress

GridViewSettings.ClientSideEvents Property

aspnet-devexpress-dot-web-dot-mvc-dot-gridviewsettings-4cb0c990.md

latest2.7 KB
Original Source

GridViewSettings.ClientSideEvents Property

Gets an object that lists the client-side events specific to the GridView.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v20.1.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public GridViewClientSideEvents ClientSideEvents { get; }
vb
Public ReadOnly Property ClientSideEvents As GridViewClientSideEvents

Property Value

TypeDescription
GridViewClientSideEvents

A GridViewClientSideEvents object which allows assigning handlers to the client-side events available to the GridView extension.

|

Remarks

The ClientSideEvents property provides access to a GridViewClientSideEvents object, which contains properties whose names correspond to the events available to the GridView on the client side. These properties enable handling the events by assigning the JavaScript functions to the required client-side events of GridView.

Example

Note

For a full example, see the Grid View - Focused Row demo.

razor
@Html.DevExpress().GridView(settings => {
    settings.Name = "gvFocusedRow";
    settings.CallbackRouteValues = new { Controller = "Rows", Action = "FocusedRowPartial" };
    settings.ClientSideEvents.FocusedRowChanged = "OnGridFocusedRowChanged";
    ...
}).Bind(Model).GetHtml()
js
function OnGridFocusedRowChanged(s, e) {
    s.GetRowValues(s.GetFocusedRowIndex(), 'EmployeeID;Notes', OnGetRowValues);
}

See Also

Client-Side API

Grid View

GridViewSettings Class

GridViewSettings Members

DevExpress.Web.Mvc Namespace