I have a gridview with a checkbox column. When the checkbox is checked, I would like to immediately perform some validation and cancel the check if the validation fails. I would like this to happen immediately and not when the user leaves the cell.
I have set the editmode of the column to onvaluechange and now the CellValueChanged event fires as soon as the checkbox is checked. I can perform validation there and show a messagebox immediately if the validation fails. However if I uncheck the textbox from the CellValueChanged event, it doesn't take affect until the user leaves the cell.
I've tried using the CellValidation event but it doesn't fire until the user leaves the cell.
How can I uncheck the checkbox and have it take effect immediately, without the user having the leave the cell?