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
|
Hi there, I've got a scenario and was wondering how best to implement it... I am using the PropertyGrid with a class containing a collection of custom PropertyDescriptors. The class is generated dynamically based on a template specified in a database. The database also contains information on which of the properties are required, and I was wondering how I could visually display this information on the property grid - perhaps by highlighting with a different colour or something. I was thinking perhaps I could add an additional property to my custom PropertyDescriptor class which would hold the required property setting - but am slightly stumped as to how I could consume this with the PropertyGrid and indicate the property visually. Any suggestions? Best Regards, Justin Rafferty. |
|
|
This would currently require retemplating the grid. Once you have done that (see the Poppy sample and the additional info towards the end of this thread: http://www.mindscape.co.nz/forums/Thread.aspx?ThreadID=1194), you can manipulate the property name cell template relatively easily; you can also tweak the row template and the property value edit cell template with a bit of extra effort. The objects of the grid are PropertyGridRow objects and you can extract the property metadata using Node.Property, from which you can get to custom attributes or whatever means you are using to advertise mandatory properties. Let me know if this is enough to get you going -- if not then perhaps you could say a bit more about how you want to represent required properties in your class model and in the UI and I can give you some more specific pointers. |
|
|
Thanks for the pointers Ivan, I begin experimenting and will let you know if I run into any difficulties. |
|