Skip to main content
A newer version of this page is available. .

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.v19.2.dll

Declaration

public delegate void GridViewCustomBindingGetDataHandler(
    GridViewCustomBindingGetDataArgs e
);

Parameters

Name Type Description
e GridViewCustomBindingGetDataArgs

An GridViewCustomBindingGetDataArgs object that contains the related arguments.

Remarks

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