Groups | Blog | Home
all groups > dotnet windows forms designtime > april 2005 >

dotnet windows forms designtime : Custom PropertyGrid Sort!


Özden Irmak
4/13/2005 2:48:47 PM
Hi,

I want to achieve custom sort on properties on a propertygrid. This means
that I don't want any alphabetical sort but want to use my own sort
algorithm.

Does anybody know how to do this?

Regards,

Özden Irmak

VisualHint
4/14/2005 6:44:17 AM
Dear Ozden,

For sure, you can't sort the categories. What you can do for properties
is to derive from ICustomTypeDescriptor and control the order of the
properties you return with GetProperties. Not very intuitive.

Note also that a new product is in development, Smart PropertyGrid
visible at http://www.propertygrid.net, that will allow custom sort
(could be on UserData stored in each property for example). I'm
currently grabbing ideas for this feature so if you want to
participate ;)
A post dealing with this issue will be available today or tomorrow on
the web site.

Best regards

Nicolas Cadilhac
VisualHint (http://www.visualhint.com)

[quoted text, click to view]
Peder Y
4/18/2005 12:00:00 AM
I read somewhere you could "sort" the categories using \r, \r\r, \r\r\r
and so on in front of the category text, altough I havent tried this yet
myself.

The properysorter class found on The Code Project will give you a quick
and easy way to sort your properties.

- Peder -


[quoted text, click to view]
Mital
5/3/2005 12:00:00 AM
Hi,

Try this:
How to make properties in your custom data type appear in a particular order
in the property browser
http://www.syncfusion.com/faq/windowsforms/search/28.aspx

Regards,

Mital
http://mital.kakaiya.com


[quoted text, click to view]

AddThis Social Bookmark Button