This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I have an existing application that makes heavy use of typed datasets. My problem is that because of the orginal design my object is derived from a base help class that is derived directly from the typed dataset, I don't have access to every attribute to mark it as browsable=false. What I really need is a way to default the grid to browsable false then only turn on the attributes that I want. Am I being clear? Is this possible? |
|
|
There's no way to do this at the grid level: instead you would need to do it by overriding the class metadata. One way to do this is to implement ICustomTypeDescriptor. You can then implement GetProperties to return custom property descriptors with IsBrowsable set to false by default, and to true only for your marked-up properties. ICustomTypeDescriptor can be a pretty intimidating interface: a more lightweight solution is to apply TypeConverterAttribute and in your TypeConverter override GetPropertiesSupported and GetProperties. The latter will again return custom property descriptors as described above. However TypeConverter.GetProperties is only supported in recent nightly builds. Hope this helps -- let us know if you need any further guidance. |
|