Is there a way to set the category order in the PropertyGrid

G

Guest

I have an application which uses the PropertyGrid to display
highly-customised dynamic data using ICustomTypeDescriptor. I need to be able
to display the properties within categories with the order of both the
categories and properties being programmable.

I can control the order of properties by setting PropertyGrid.Sort to
Categorized (which displays properties within each category in the order they
are returned from ICustomTypeDescriptor.GetProperties), but I can find no way
of controlling the order of the categories themselves. They always seem to be
displayed in alphabetical order independent of the order in which the
properties are returned.

Is there any way to override this category order?
 
T

Tom Krueger [MSFT]

Hello,

I'm not sure if there is a way to order the categories, however, here are
links that I have for the property grid. There may be something in them.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/usingpropgrid.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/vsnetpropbrow.asp
http://www.c-sharpcorner.com/Code/2004/June/PropertyGridInCSharp.asp

In the mean time I will ask around.


--
Tom Krueger

My Blog - http://weblogs.asp.net/tom_krueger
Smart Client DevCenter - http://msdn.microsoft.com/smartclient/
Mobile DevCenter - http://msdn.microsoft.com/mobility

This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top