|
-
Mar 17th, 2008, 04:58 PM
#5
Thread Starter
Member
Re: How do I validate a custome property value in a custom class?
Firstly, so you understand my level of knowledge - I'm a seasoned programmer (mainframe styley), but VB is a hobby, and one that I don't get too much exposure to.
PropertyGridEx is a nice little extension of the standard Property Grid. It allows you to take any value (variable, property or control) and assign it to a Property Grid value. Essentially this means that the user can enter a value and the property value (in my example) gets updated automatically.
But - the Property grid allows you to type an alpha value into a text box (naturally) even though the attached property is a double. So somewhere in between the text being entered and it reaching the property which is incompatible, I need to catch the error. Unfortunately it seems to be in no-mans land, and I can't intercept it. You can see the result of adding an "x" to a similar, integer property in the image below (I hope it shows up).
I'm hoping there is a standard method for dealing with this situation.
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
|