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!
How to validate a DataGridViewComboBoxCell??
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Bechir BejaouiRank #144 · 15.9K reputationPosted Feb 27, 2009, 2:18 PM EST
But verify that CauseValidation property is set to true
Ivar4 reputationPosted Feb 28, 2009, 1:39 AM EST
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 BejaouiRank #144 · 15.9K reputationPosted Feb 28, 2009, 5:08 AM EST
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