I have a check box as a column in the webdatagrid . I have defined it as BoundCheckBoxField.
I have written the following code so that the update will be fired immediately when there is a change. So, the update of a text field is happening after pressing the enter. But when i change the check box value (uncheck the checkbox) the update method is not getting fired immediately, It is getting fired when I click on delete or change the text box value of the same/different row. Could you please guide me how to fire the update function when the check box value is changed
<CellEditingClientEvents ExitedEditMode="exitedEditMode" />
function exitedEditMode(grid, args) {
grid.get_behaviors().get_editingCore().commit();
}
Thanks in advance.
Thanks for your reply. It is very useful.
If we use CellValueChanged event on every cell, if there are many columns in the row then it will fire too many updates and will not be user friendly.
I have a text box, check box and a drop down in a row of the grid. We don't want to have an explicit update button for the grid but would like to update the changes. What will be the logical point to fire a update and how can we implement that. Is there a event to find whether the user tabbed out of the grid?
can I fire a update when the user completed updating a row? If I do not call the java script on cellchanged or exited enter mode ( grid.get_behaviors().get_editingCore().commit();) it is firing update randomly when i press on some other button on a row etc.. what happens if we do not perform any event in the grid after editing a row and leave the grid? when the update will be fired?
Can you please guide me in addressing this issue and also is there a sample for using webdropdown as a templatedatafield in webdagrid and how to access its value in code behind update function when using a object datasource for a webdatagrid
Hi kalyanigoli,
Checkbox cells never actually enter edit mode. That is why CellValueChanged event was added to edting core. You should use that event to accomplish what you want.
regards,David Young