|
-
Jan 2nd, 2008, 08:52 PM
#2
Re: [2005] DataGridView Cell Check for number
You shouldn't be using CellLeave. You should be using CellValidating.
Also, to ensure that a string is a valid representation of a number you should not be converting and catching exceptions on failure. You should be calling the TryParse method of the appropriate numeric type. If the number needs to be a valid Short then use Short.TryParse.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|