public virtual PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors) { var lst = new List <DictionaryToTableDataSource_CustomPropertyDescriptor>(); //根据设定的列返回相应的属性名称 foreach (var column in Columns) { var temp = new DictionaryToTableDataSource_CustomPropertyDescriptor(this.Items, column.Key, column.Value, null); lst.Add(temp); } return(new PropertyDescriptorCollection(lst.ToArray())); }
public PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors) { var lst = new List <DictionaryToTableDataSource_CustomPropertyDescriptor>(); //根据设定的列返回相应的属性名称 foreach (var column in Columns) { var temp = new DictionaryToTableDataSource_CustomPropertyDescriptor(this.Items, column.Key, column.Value, null); lst.Add(temp); } if (IsAutoInsertRowIndex) { var t = new DictionaryToTableDataSource_CustomPropertyDescriptor(this.Items, RowIndexColumnName, typeof(int), null); lst.Add(t); } return(new PropertyDescriptorCollection(lst.ToArray())); }