.NET Framework Developer Center >
.NET Development Forums
>
.NET Base Class Library
>
Hide a property in a grid conditionally
Hide a property in a grid conditionally
- Hi,
I have a class which has n properties. The object of this class is assigned to propertygrid.selectedObject. In grid I want to hide some properties only if its value is null. Is it possible to use browsable attribute conditionally. If not, how to proceed to achieve this..
Answers
- Hi,
You should use ICustomTypeDescriptor.
Hope these helps.
http://msdn.microsoft.com/en-us/magazine/cc163816.aspx
http://blogs.msdn.com/parthopdas/archive/2006/01/03/509103.aspx
http://www.codeproject.com/KB/cs/dzdynamicproperties.aspx- Marked As Answer byeryangMSFT, ModeratorWednesday, November 11, 2009 9:38 AM
- Hi,
Same question was asked in another thread:
http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/d5d22d23-122c-48cc-bf30-c27de35822cd/
Please don't post duplicate threads:)
Thanks,
Eric
Please remember to mark helpful replies as answers and unmark them if they provide no help.- Marked As Answer byeryangMSFT, ModeratorWednesday, November 11, 2009 9:38 AM
All Replies
- Hi,
You should use ICustomTypeDescriptor.
Hope these helps.
http://msdn.microsoft.com/en-us/magazine/cc163816.aspx
http://blogs.msdn.com/parthopdas/archive/2006/01/03/509103.aspx
http://www.codeproject.com/KB/cs/dzdynamicproperties.aspx- Marked As Answer byeryangMSFT, ModeratorWednesday, November 11, 2009 9:38 AM
- Hi,
@Harish T Badagi: You seem to have started a new thread on the same matter.
Were you satisfied with Tamer Oz first solution or with my answer? Are there any problems not solved yet? What do you miss?
Marcel - Hi,
It is a long time since the last reply, did you get useful information from above suggestions, or you still have any concern about this issue? Please let us know.
Thanks,
Eric
Please remember to mark helpful replies as answers and unmark them if they provide no help. - Hi,
Same question was asked in another thread:
http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/d5d22d23-122c-48cc-bf30-c27de35822cd/
Please don't post duplicate threads:)
Thanks,
Eric
Please remember to mark helpful replies as answers and unmark them if they provide no help.- Marked As Answer byeryangMSFT, ModeratorWednesday, November 11, 2009 9:38 AM


