Skip to main content

GridViewCustomBindingGetDataHandler Delegate

A delegate method that enables you to populate the grid view model with data rows requested by the grid, when implementing custom data binding of the GridView.

Namespace: DevExpress.Web.Mvc

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

NuGet Package: DevExpress.Web.Mvc5


public delegate void GridViewCustomBindingGetDataHandler(
    GridViewCustomBindingGetDataArgs e


Name Type Description
e GridViewCustomBindingGetDataArgs

An GridViewCustomBindingGetDataArgs object that contains the related arguments.


public static void MyGetData(GridViewCustomBindingGetDataArgs e) {
  e.Data = Model
      .ApplyFilter(e.State.FilterExpression) //Your function that filters your model 
      .ApplyGroupFilter(e.GroupInfoList) //Your function that filters your model so that it contains rows meeting the applied grouping 
      .ApplySorting(e.State.SortedColumns) //Your function that sorts your model 
      .Skip(e.StartDataRowIndex) //Position on the first required data row 
      .Take(e.DataRowCount); //Get the number of currently requested data rows (rows of the current page or visible rows of the processed group) 

Refer to Implementation of Typed Method Delegates to learn more.

See Also