I have a property of type string[]. If you open the String Collection Editor the items are in the correct order, but when you expand the collection in the PropertyGrid the items appear to be in a random order (instead of being displayed as 0..n).
I am using RadControls for WinForms Q2 2012 SP1.
1 Answer, 1 is accepted
0
Ivan Petrov
Telerik team
answered on 09 Jan 2013, 08:01 AM
Hello Sean,
Thank you for writing.
We are aware of this behavior and have it in our Public Issue Tracking System - PITS. You can track its progress, subscribe for status change alerts and add your vote/comment to it on the following link - PITS Feature. Until the issue is resolved you can work around it by creating a custom IComparer<> class and using it in RadPropertyGrid:
this.radPropertyGrid1.PropertyGridElement.PropertyTableElement.CollectionView.Comparer = new MyComparer();
public class MyComparer : IComparer<PropertyGridItem>
{
public MyComparer()
{ }
public int Compare(PropertyGridItem x, PropertyGridItem y)
{
return x.Label.CompareTo(y.Label);
}
}
I hope this will be useful .Should you have further questions, I would be glad to help.
Kind regards,
Ivan Petrov
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.