Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using a PropertyGrid in C# to display ConfigurationElements. I have an implementation of a ExpandableObjectConverter TypeConverter to display the sub-elements (with descriptions) in the property grid.

E.g.
Item 1
     First sub-item
     Item 1 ID
     Second sub-item
     x
Item 2
     First sub-item
     Item 2 ID
     Second sub-item
     x
...


I want to display the sub-elements in a specific order - not alphabetically (e.g. The ID before the other sub-elements).

Could anyone please tell me how to specify the ordering? (I've Googled it, looked at CodeProject articles, looked on MSDN - where I (momentarily) thought I'd found a solution using SortProperties - which turns out not to be overridable.)

Any ideas would be much appreciated.
Posted

1 solution

Wags wrote:
Any ideas would be much appreciated.

Would it be an option to override the GetProperties[^] method?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900