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

Validate Text and Tab inside DataGridView Row

P: 7
Sorry if this is a totally newbie question, but I haven't found a decent answer.

I am using VS 2008.

I have a DataGridView on a Windows Form. First, I want to validate that the input in the current cell is a one digit numeric. Second, after the validation I want to autotab to the next column.

I have tried SendKeys.SendWait("{TAB}") on every method for the DataGrid, with no luck.

Please post links or suggested code.

Thanks
Dec 8 '07 #1
Share this Question
Share on Google+
2 Replies


P: 7
Bump.

I really need an answer. Every suggestion I have found is so vague and confusing that its not even worth trying.
Dec 13 '07 #2

Expert 5K+
P: 8,434
I'm not familiar with the DataGridView, but perhaps you can set a "current column" property to put the focus on a particular column. Or maybe you should check out the various Set... methods.

As for validation, have a look through the various events to see what seems appropriate for your situation. There are a number which sound as though they might be relevant. For example CellValidating, CellValidated, CellLeave.

Have a look here for info and what look like useful links in relation to DataGridView. I can't rate them, as I've never used it.
Dec 14 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.