The client binding architecture included in WebGrid 7 is a set of comprehensive new classes, methods and interfaces to enable programmatic consumption in elegant fashion. Most of the user interface functions and high-level encapsulation of binding process called the same underlying APIs.
The following sections explain the new public methods and events which are available when client binding mode is enabled and the data source type is set to either client services or client data source.
This topic contains the following sections:
New Methods
Several methods have been added as extensions to provide programmatic client binding functionality. These methods will only be available when client binding feature is enabled.
Class | New Method | Parameters |
WebGrid | SetDataSource (Assign a new client-side datasource to WebGrid) | dataSource, tableName |
GetConvertedDataSource (Gets the datasource that has been converted to CDOF-compatible object) | - | |
DataBind (Instructs WebGrid to perform data binding based on assigned datasource) | - | |
LoadData (Instructs WebGrid to perform initial data loading) | - | |
Render (Perform rendering based on bound data) | - | |
RebindData (Rebind WebGrid with new datasource) | dataSource, skipDataDispatch | |
WebGridTable | GetUngroupedRows (Gets ungrouped rows collection of this table) | - |
GetRowByKeyValues (Gets the WebGridRow based on the specified key values) | keyValues | |
DispatchDataTable (Gets the CDOF data table object) | - | |
GetView (Gets the CDOF data view object) | - | |
DataBind (Perform data binding for this table) | - | |
FillDataSourceArguments (Populate view state into datasource arguments used for data retrieval operation) | arguments, sortState, filterState, pagingState | |
GetSortExpression (Gets the sort expression required to construct the view for this table) | ||
GetFilterExpression (Gets the filter expression required to construct the view for this table) | ||
Render (Render the view for this table) | subTable | |
UpdateDataStatus (Updates the status of current datasource to UI) | - | |
WebGridRow | GetGroupRowLevel (Gets the group row level of this row) | - |
HasCollapsedParent (Whether this row has collapsed parents) | - | |
HasGroupedChilds (Whether this row has grouped child rows) | - | |
HasExpandedChilds (Whether this row has expanded child rows) | - | |
ExpandGroupRowsToThisRow (Expands all parent group rows down to this row) | - | |
CopyTo (Copies this row's structure and data to destination object) | targetObject, isModifiedOnly, followTargetStructure |
New client side events
The following table describes the new client side events related to client binding feature.
Event Name | Description | Parameters |
OnCustomAggregate | Fired when WebGrid needs to perform custom aggregation for column which AggregateType is set to Custom. | controlId, columns, rows, type |
OnInitializeRow | Fired when a row is initialized. | controlId, row |
OnInitializeCell | Fired when a row requires synchronization. | controlId, row |
OnSynchronizeRow | Fired when a row requires synchronization. | controlId, row |
OnSynchronizeCell | Fired when a cell required synchronization | controlId, cell |
OnDataSourceChanged | Fired when data source has been changed. | controlId |
OnDataBound | Fired when data binding process is completed. | controlId |
OnPreRender | Fired before WebGrid enters rendering phase. | controlId |
OnPostRender | Fired after rendering operation is completed. | controlId |
Getting Started
Getting Started
Overview
WebGrid Features Overview
Other Resources
Walkthrough Topics
How-to Topics