Resetting PropertyGrid value to old value 
Author Message
 Resetting PropertyGrid value to old value

When in the PropertyValueChanged event handler I determine that the value
entered is invalid, how do I reset that value to the old value?

Also, how do I trap the default messages that come up when an invalid entry
is entered into a standard field such as a field that only takes Int32. By
default, the system will put up an unfriendly message box.



Sat, 07 May 2005 03:19:41 GMT  
 Resetting PropertyGrid value to old value

--------------------

Quote:
> X-Trace-PostClient-IP: 68.147.103.224


> Newsgroups: microsoft.public.dotnet.languages.vc
> Subject: Resetting PropertyGrid value to old value
> Lines: 8

> When in the PropertyValueChanged event handler I determine that the value
> entered is invalid, how do I reset that value to the old value?

> Also, how do I trap the default messages that come up when an invalid
entry
> is entered into a standard field such as a field that only takes Int32. By
> default, the system will put up an unfriendly message box.

David, are you writing an add-in?  It would be helpful if you can give more
detail about your situation.

1) We generally don't cache the old property value;
2) That message box only pops up when you change the property through UI.  
Are you are setting properties programatically?  if so, the invalid entry
would cause an exception that can be caught.

But once again, if you could provide more detail, we may answer your
question more to the point.

Thanks.

--
Rui Sun
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no
rights.



Wed, 06 Jul 2005 02:55:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Value, value, who's got the value?

2. Automatic refreshing values in PropertyGrid

3. Old Values

4. addition long values to long double value ?

5. global value and extern value

6. How can I transform a int value to a char value

7. read WMF-header and convert DWORD value to integer value

8. l-value and r-value

9. ~Sum existing values with values from another table

10. Simple C++ question: Using return values (by value)

11. Initializing An Edit box that holds an Integer Value to Blank instead of any value

12. Why the RGB value I get from Getpixel() is different from the value from the bit

 

 
Powered by phpBB® Forum Software