Client Side Events
This Demo explains the usage of client-side events with GridWeb Control.
The GridWeb can fires 7 client side events. They are:
- OnCellSelected:
fires when a cell is selected. Use the GridWeb.OnCellSelectedClientFunction property to specify the client-side event handler.
- OnCellUnselected:
fires when a cell is unselected. Use the GridWeb.OnCellUnselectedClientFunction property to specify the client-side event handler.
- OnCellUpdated:
fires when a cell's value has been changed. Use the GridWeb.OnCellUpdatedClientFunction property to specify the client-side event handler.
- OnDoubleClickCell:
fires when a cell is double-clicked. Use the GridWeb.OnDoubleClickCellClientFunction property to specify the client-side event handler.
- OnCellError:
fires when a cell's validating operation is failed. Use the GridWeb.OnCellErrorClientFunction property to specify the client-side event handler.
- OnSubmit:
fires when the grid is about to postback. If the event handler returns false, the postback will be canceled. Use the GridWeb.OnSubmitClientFunction property to specify the client-side event handler.
- OnValidationError:
fires when there are any error before postback. Use the GridWeb.OnValidationErrorClientFunction property to specify the client-side event handler.
This Demo creates a GridWeb control with all the 7 event handlers:
<agw:GridWeb id="Gridweb1" runat="server" Height="250px" Width="350px" OnCellErrorClientFunction="onCellError" OnCellSelectedClientFunction="onCellSelected" OnCellUnselectedClientFunction="onCellUnselected"
OnCellUpdatedClientFunction="onCellUpdated" OnDoubleClickCellClientFunction="onDoubleClickCell" OnSubmitClientFunction="onSubmit" OnValidationErrorClientFunction="onError">
Check the source of this page to see the client side javascript functions' defination .
Try clicking, double-clicking and typing in the bottom grid, and the bottom right window will show the events of the grid.
Run the demo
[Run Sample]