469,912 Members | 1,842 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Some questions about PropertyGrid control

Now I am developing a tool, just like VS.net Form Edition environment.
User can edit a component's properties by a PropertyGrid control.
Now I have some questions about this PropertyGrid control:
1. How to verify a property's validifity?
as you know, In VS.net, when we input a component name that is same with an
existed name in the propertygrid, an error message will pop up: "Invalid
property value".
Now, my question is, how to implement this verification?
Certainly, I can check every property's validifity by handling the event
PropertyValueChanged. But I think it is not so good, because there are so
many properties, and it is a little complicated about logic.
Could you give me a classical solution about this problem?

2. How to change readonly attribute of a property at run time?
As we know, if we want a property to be readonly, we can implement it by
adding an ReadonlyAttribute above the property. But how to changed it at run
time?
In some cases, a property's edition maybe make another property to be
readonly.
So how to create this relationship between properties.

I am a little comfused about propertyGrid control, Could you tell me a good
solution?
Any advice is appreciated.
Thank you.

Nov 17 '05 #1
0 1239

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Zoury | last post: by
4 posts views Thread by Alexander Wehrli | last post: by
1 post views Thread by ANDRES BECERRA | last post: by
4 posts views Thread by Bernie Yaeger | last post: by
6 posts views Thread by Steve Teeples | last post: by
4 posts views Thread by phcmi | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.