I have a grid in which certain columns/cells have a MaskInput and Format. For example:
column.Format = "dd/MM/yyyy";column.MaskInput = "dd/mm/yyyy";
This all works fine as long as the entered data can be converted to the column DataType (in this case obviously DateTime). But if the user accidently enters __/__/2008 the conversion fails and a popup is shown with following error message:
Unable to update the data value: Value in the editor is not valid.
Is it possible to supress the error dialogbox? I don't want it to show. I would prefer the grid discards the invalid entered info (and reverts to the old value) or enters a default value.
- Infragistics .NET Advantage for Windows Forms 2008 Volume 2
Thanks!
Hi Marc,
There is an CelldataError Event ..use that and withinset
e.RaiseErrorEvent = False
If u want to retain the old value u set this prop
t = False
e.RestoreOriginalValue=true
to stay in edit mode
e.StayInEditMode
Hope this helps you ........
hppy koding ,
Arun
hello arun,
i have used the above coding with a little alteration.
e.RestoreOriginalValue = False
e.StayInEditMode = True
In the above case e.StayInEditMode is Not Working in a proper way, since if we click buttons then the cursor leaves from the cell and switches to button events.
Is there any other way to get rid of the above issue?
Regards
Janani.S