Hello,
I read on the online help that the CellDataError event is fired after the BeforeExitEditMode is fired. I also read that the CellDataError event is not fired when the BeforeExitEditMode event is cancelled.
My issue is the following:
I have a textbox cell that will validate the input with the CellDataError event, and will notify my controller class of a change in the textbox cell via the CellChange event. Whats happening is the following:
When the user types in a value, whether valid or invalid, the CellChange event fires, but the CellDataError does not. My first assumption was that the event is being canceled so I tried using the EventManager.AllEventsEnabled = true; but that does not work either.
Anyone have an idea how to use both? I need the following sequence of events: 1- if the values are not with in the specified range of the regular expression pattern, the fire the CellDataError 2- if the values are with in the range, fire the CellChange event.
Thanks!
CellDataError fires when the user leaves the cell, not on each key press. It sounds like you want to validate in response to the CellChange event instead.
I'm having problems with CellDataError event,I don't get why but when I delete a row on ultragrid after that CellDataError event does not fire, I saw AfterCellUpdate and other events fire but only CellDataError event does not fire.
Precisely what I did as an alternative, but the I cannot restore the original value.
Ex:
cell.Value = 1000; and must be between 0 and 1000.
User enters 1001, on the CellChange, the last value I know of is 100. Similarly, on the first CellChange event, I get the default value it had as the original value, on the second, I get 1, and third 10, and lastly, I get 100.
My workaround is to validate and if still invalid, raise a custom event to my controller class that will restore the original value, which I have in my data table.