468,527 Members | 2,070 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,527 developers. It's quick & easy.

DataGridView CellValidating event triggers MORE OFTEN than I need, I think???

After a user edits a Cell in one of my DataGridViews, I want to make
sure what the user has typed in is 'valid'. If it's not, I want to
Cancel the Edit.

Ok, you say, use the CellValidating event for this. That's fine, I
have... BUT...

As you experts probably know, the CellValidating event triggers not
just when a user EDITS a cell, but seemingly any time a Cell is
selected. (Feel free to tell me I'm wrong about this, by the way).

All I want to do is trigger a message to the User after he finishes
editing a Cell letting him know if there is a problem with what he has
typed into the Cell.

Well, you say, use the CellEndEdit event. Well, I would... if that
event had a "Cancel" capability (which the CellValidating event *does*
have), but the CellEndEdit doesn't have a "Cancel" capability.

I guess I could trigger a message in CellEndEdit and inform the user
in a Msgbox that he should hit the 'Esc' key to return to the cell's
previous value... but I'm wondering if this is the most efficient way
of handling what I'm trying to accomplish.

I thank you in advance for your help.
Aug 20 '08 #1
0 1044

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Dave | last post: by
9 posts views Thread by Miro | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.