By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,069 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,069 IT Pros & Developers. It's quick & easy.

OnValidating in editing control

P: n/a

I made my own DataGridViewEditingControl, DataGridViewCell and
Is it possible to use an Onvalidating event in an editing control in a
I wrote something like this:

Protected Overrides Sub OnValidating(ByVal e As
If Me.Text <String.Empty Then
If Me.Text <"CORRECT"
e.Cancel = True
End If
End If
End Sub

But when tabbing out the cell it gets executed twice plus that the incorrect
value in the cell remains and the I can continue to edit in other cells.The
event is correctly handled when I click somewhere else with the mouse (being
the cursor remaining in the cell until a correct value is given).

Do I need to do something special when the tab key is pressed.

Any help is appreciated.

Thanks in advance.
Jul 7 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.