PropertyGrid-disabling category sorting

F

FUnky

(.Net 1.1)

Hi All,

This concerns adding properties to a propertygrid dynamically. The situation
is as follows:

I have a property bag from where I display properties as name/value pairs in
my property grid. To add a property, I simply do the following (on a 'Add'
Button Click):
CustomProperty myProp = new
CustomProperty(txtName.Text,txtValue.Text,chkReadOnly.Checked,true,txtGroup.Text);
myProperties.Add(myProp);
pGrProperties.Refresh();
Here, the property with the name(txtName.Text) gets added to the
group(txtGroup.Text).

Consider the scenario when I add a property with name 'some_name' to group
'G2'. It gets added, no problem. Then I add a property with name
'some_other_name' to group 'G1'. In this case, I need G1 to appear after G2,
but what happens is exactly the opposite. The groups seem to appear
alphabetically, even if I set PropertySort to Categorized and not to
CategorizedAlphabetical.

I would greatly appreciate any solution to this problem.

FUnky.
 
F

FUnky

I would be happy if there were any cheats to this problem as well. It is so
important to me.
 

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