string[] property order

2 posts, 0 answers
  1. Sean
    Sean avatar
    10 posts
    Member since:
    Aug 2012

    Posted 03 Jan 2013 Link to this post

    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.
  2. Ivan Petrov
    Ivan Petrov avatar
    717 posts

    Posted 09 Jan 2013 Link to this post

    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.
Back to Top