I have problem with validating combo box cells. I can't figure it out how to do it. CellValidating event gives me only the formatted value of the cell. Thtat's useless for combo boxes. I need to validate the value not the displayed text. The value object of the combo box cell is null during the (first) Validation event. It gets updated after the validation. So how to validate the actual value of a combo box cell?
Thanks!
Loading
Bechir BejaouiPosted Feb 28, 2009, 10:08 AM
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.onleave.aspx
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.onmouseleave.aspx
To impose your format and you can use the Reqular expression for that System.Text.RegularExpressions
IvarPosted Feb 28, 2009, 6:39 AM
Now I have found solution for that. I can cast the data grid view's editing control to combo box and get the new value from there.
Bechir BejaouiPosted Feb 27, 2009, 7:18 PM
But verify that CauseValidation property is set to true