Numerous client-side events are introduced in this release to more extensibility and greater control over WebGrid's functions and behaviors.
The new client side events are:
- OnInitializeCustomEditor
Specifies the client side (JavaScript) function that will be invoked when a custom editor is about to be initialized.
Parameters: controlId, editorName, editorObject, customEditor
- OnColumnContextMenu
Specifies the client side (JavaScript) function that will be invoked when the column's context menu is about to be displayed.
Parameters: controlId, col, menu, isGroup, location
- OnExportContextMenu
Specifies the client side (JavaScript) function that will be invoked when the exporting context menu is about to be displayed.
Parameters: controlId, table, menu, location
- OnBatchUpdateError
Specifies the client side (JavaScript) function that will be invoked when one or more records are failed to be updated during batch update process.
Parameters: controlId, errorXml
- OnColumnAction
Specifies the client side (JavaScript) function that will be invoked when users click on the column action indicator.
Parameters: controlId, column
- OnAfterExitEditMode. The parameters are controlId, tableName, editObject.
This event is invoked after user exits cell-level editing. Unlike OnExitEditMode event, OnAfterExitEditMode is fired after default editing process is completed, making it possible for you to inspect the new cell values and perform custom logic.
- OnBeginRowEditing. The parameters are controlId, row.
This event is invoked when user begins to edit a row. Unlike OnEnterEditMode, this event is fired only one-time when a row is about to be edited. Furthermore, this event is applicable on row-level instead of cell-level.
- OnEndRowEditing. The parameters are controlId, row.
This event is invoked when user ended row editing completely. Similar to OnBeginRowEditing, this event is applied on row-level, and is called only one-time when user ended row editing. This event is fired after OnExitEditMode and before OnRowValidate.
- OnCancelRowEditing. The parameters are controlId, row.
This event is invoked when user canceled row editing. This new client side event enables you to process custom logic when user canceled the editing. For example, you may want to validate if the cancelation has met specific condition before the cancelation is allowed to be processed further.
Overview
Client-side Events