or

class UserDataPropertyDescriptorCollection : PropertyDescriptorCollection{ public UserDataPropertyDescriptorCollection(PropertyDescriptor[] propertyDescriptors) : base(propertyDescriptors) { } public override PropertyDescriptorCollection Sort() { PropertyDescriptorCollection ret = new PropertyDescriptorCollection(null); return this; } public override PropertyDescriptorCollection Sort(string[] names) { return this; } public override PropertyDescriptorCollection Sort(string[] names, System.Collections.IComparer comparer) { return this; } public override PropertyDescriptorCollection Sort(System.Collections.IComparer comparer) { return this; }}public class UserDataExpandableObjectConverter : ExpandableObjectConverter{ public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { PropertyDescriptorCollection d = base.GetProperties(context, value, attributes); List<PropertyDescriptor> props = new List<PropertyDescriptor>(); foreach (PropertyDescriptor f in d) { props.Add(f); } UserDataPropertyDescriptorCollection m = new UserDataPropertyDescriptorCollection(props.ToArray()); return m; }}public class alpha{ private UserDataCollection usd; private string test; public alpha() { usd = new UserDataCollection(); test = "Fun"; } [TypeConverterAttribute(typeof(UserDataExpandableObjectConverter))] [Category("Collection")] public UserDataCollection Collection { get { return usd; } set { usd = value; } } [Category("String")] public string Attr { get { return test; } set { test = value; } }}public Form1(){ InitializeComponent(); UserDataCollection temp = new UserDataCollection(); alpha obj = new alpha(); //Inner test = new Inner(); for (int i = 0; i < 25; i++) { obj.Collection.Add(""); } radPropertyGrid1.SelectedObject = obj;}






