Custom PropertyGrid Sort!

Ö

Özden Irmak

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
 
V

VisualHint

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)
 
P

Peder Y

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 -
 

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