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

Hide or show a property in a propertygrid

P: n/a
Using VS2005, is the a simple method to hide or show a property within a
propertygrid based upon the changing value of another property within the

For example, if I change a boolean property to true then I'd like to show a
second property that only applies when the first property is true.
Feb 11 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Hi Steve,

Thanks for your post.

Normally, PropertyGrid will query the static properties of the bound
object, and the properties can not be changed. However, before PropertyGrid
query the static properties, it will query if the object implement
ICustomTypeDescriptor interface. So we can use this interface as a hook to
dynamically add/remove properties.

The codeproject article below demonstrates this technology:
"Add (Remove) Items to (from) PropertyGrid at Runtime"

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
This posting is provided "as is" with no warranties and confers no rights.

Feb 13 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.