Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Collapse]Grid View
    Overview - GridView
    Main Features - GridView
   [Collapse]Concepts
    [Collapse]Binding to Data
      Binding to Data via Entity Framework (Code First)
      Binding to Data via Entity Framework or LINQ to SQL (Database First)
      Binding to Large Data (Database Server Mode)
     [Collapse]Custom Data Binding
       Custom Data Binding - Overview
       Action Types and Passed Parameters
       Methods to Update the Grid State in Actions
       ProcessCustomBinding - Available Binding Delegates
       Implementation of Typed Method Delegates
       Custom Binding Limitations
    [Expand]Data Representation Basics
    [Expand]Focus and Navigation
    [Expand]Data Editing and Validation
    [Expand]Export Overview
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]HTML Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Navigation and Layout Extensions
  [Expand]File Management
  [Expand]Multi-Use Site Extensions
  [Expand]Charts
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Tree List
  [Expand]Data Editor Extensions
  [Expand]Report Extensions
  [Expand]SpellChecker
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

ProcessCustomBinding - Available Binding Delegates

To delegate the implementation of a grid view model population to Model-layer functions, call the view model's GridViewModel.ProcessCustomBinding method in a Controller. This method has several overloads with different sets of parameters. The result of the method call is that the intrinsic grid view model object (GridViewModel) will be populated with the requested data. The view model object can then be passed to the grid's Partial View as a Model and bound to the GridView via the grid's GridViewExtension.BindToCustomData method.

Expanded Method Overloads

From the following list of available overloads, you can select a particular overload depending on specific data processing features (such as grouping, filtering, the display of header filter buttons) used within the grid.

Overload List - C#
public void ProcessCustomBinding( 
   GridViewCustomBindingGetDataRowCountHandler getDataRowCountMethod,  
   GridViewCustomBindingGetDataHandler getDataMethod 
);
public void ProcessCustomBinding( 
   GridViewCustomBindingGetDataRowCountHandler getDataRowCountMethod,  
   GridViewCustomBindingGetDataHandler getDataMethod,  
   GridViewCustomBindingGetGroupingInfoHandler getGroupingInfoMethod 
);
public void ProcessCustomBinding( 
   GridViewCustomBindingGetDataRowCountHandler getDataRowCountMethod,  
   GridViewCustomBindingGetDataHandler getDataMethod,  
   GridViewCustomBindingGetSummaryValuesHandler getSummaryValuesMethod 
);
public void ProcessCustomBinding( 
   GridViewCustomBindingGetDataRowCountHandler getDataRowCountMethod,  
   GridViewCustomBindingGetDataHandler getDataMethod,  
   GridViewCustomBindingGetSummaryValuesHandler getSummaryValuesMethod,  
   GridViewCustomBindingGetGroupingInfoHandler getGroupingInfoMethod 
);
public void ProcessCustomBinding( 
   GridViewCustomBindingGetDataRowCountHandler getDataRowCountMethod,  
   GridViewCustomBindingGetDataHandler getDataMethod,  
   GridViewCustomBindingGetSummaryValuesHandler getSummaryValuesMethod,  
   GridViewCustomBindingGetGroupingInfoHandler getGroupingInfoMethod,  
   GridViewCustomBindingGetUniqueHeaderFilterValuesHandler getUniqueHeaderFilterValuesMethod 
);

Expanded Method Parameters

The following list describes all available method parameters. Each parameter points to a typed method delegate.

Parameter Name Is Required? Delegated Method Type Description
getDataRowCountMethod Required GridViewCustomBindingGetDataRowCountHandler Always provide an implementation for the delegated method to return the total number of data rows.
getDataMethod Required GridViewCustomBindingGetDataHandler Always provide an implementation for the delegated method to return the data rows requested by the grid.
getSummaryValuesMethod Optional GridViewCustomBindingGetSummaryValuesHandler If you use summaries within the grid, provide an implementation for the delegated method to calculate and return values of summaries required within the grid.
getGroupingInfoMethod Optional GridViewCustomBindingGetGroupingInfoHandler If you use grouping within the grid, provide an implementation for the delegated method to return grouping information for group rows. This grouping information consists of the key (the group value) and the count (the number of data rows within the group), depending on the applied filtering, grouping and sorting.
getUniqueHeaderFilterValuesMethod Optional GridViewCustomBindingGetUniqueHeaderFilterValuesHandler If you use filtering and display header filter buttons within the grid, provide an implementation for the delegated method to return unique values to be displayed in the header filter popup list invoked for a grid column.

Expanded Method Usage

The ProcessCustomBinding method's simple usage scenario is given below - only required method delegates are specified.

Controller Code:

The following code sample shows a more versatile way to use the ProcessCustomBinding method.

Controller Code:

How would you rate this topic?​​​​​​​