I am having a problem with collections in propertygrid.
1) arrays (for e.g. int array) when expanded have a weird order of indexing... 0,1,10,11...2,20... How do I fix that?
2) List<int> doesn't expand to show the list of integers. What do I do to accomplish that?
Comments: ** Comment from web user: BoucherS **
1) arrays (for e.g. int array) when expanded have a weird order of indexing... 0,1,10,11...2,20... How do I fix that?
2) List<int> doesn't expand to show the list of integers. What do I do to accomplish that?
Comments: ** Comment from web user: BoucherS **
1) Using ExpandableObject on an int array property will show the array indexes, sorted alphabetically. Using the CollectionEditor (the arrow on the PropertyGrid line) is more appropriated.
This will be fixed in v2.7. Property of type arrays won't be sorted ; indexes will appear in normal numerical way.
2) [ExpandableObject()] is used to display the public properties on an object. For a List<int>, you will see the properties Capacity and Count. Use the arrow on the propertyGrid to display the CollectionEditor and edit the content of the Collection.