Hi All,
I am facing a issue while and updatating/Adding any rows in my grid
-- problem -- while updating any cell text in AfterCellUpdate/BeforeRowUpdate/AfterRowUpdate events, i have putten custom validation check on cell so ,incase validation is incorrect it shows me message box and on press of OK button ,it chage the focus to next cell .where as i want the focus to retain on the same cell if validation is not correct
Note :-
AfterCellUpdate - Validating Cell with Custom Logic
BeforeRowUpdate -Using For Add
AfterRowUpdate - Using for Update
Example : in wingrid has a default feature like if you add some text to a integer field on grid ,it auto validates and showing the popup and on press of ok ,it focous to the same cell .
Thanks
It would be much simpler for you to use the BeforeExitEditMode event of the grid and check the ActiveCell's value, cancelling the event if it does not pass validation. If you don't want to do this validation until later, you could check the BeforeRowDeactivate event and do your logic here; this might be better if you want to do validation on the entire row at once instead of each cell at a time.
-Matt
Thanks Matt...it works .....