This walkthrough will show you how to use OnEnterEditMode client side event.
In this topic, you will learn the basic thing on how to get column's name when editing a cell using OnEnterEditMode.
To get column's name when editing a cell using OnEnterEditMode
- Select WebGrid's instance and press F4.
- In Layout Settings, select ClientSideEvents, then set OnEnterEditMode to WebGrid1_OnEnterEditMode.
- Write the following function function in OnEnterEditMode client side event:
JavaScript Copy Code function WebGrid1_OnEnterEditMode(controlId, tblName, editObject) { var WebGrid1 = ISGetObject(controlId); var cell = editObject.cellElement; alert(wgGetColNameByCell(cell)); return true; }
- Run the project.
References
OnEnterEditMode Property
Other Resources
Walkthrough Topics
How-to Topics