Property decriptor for array
Inheritance: System.ComponentModel.PropertyDescriptor
Esempio n. 1
0
        public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
        {
            int  col  = _owner._data.GetLength(1);
            Type type = _owner._data.GetType().GetElementType();

            PropertyDescriptor[] prop = new PropertyDescriptor[col];
            for (int i = 0; i < col; i++)
            {
                prop[i] = new ArrayPropertyDescriptor(_owner.ColumnNames[i], type, i);
            }
            return(new PropertyDescriptorCollection(prop));
        }
 public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
 {
     int col = _owner._data.GetLength(1);
     Type type = _owner._data.GetType().GetElementType();
     PropertyDescriptor[] prop = new PropertyDescriptor[col];
     for(int i = 0; i < col; i++)
     {
         prop[i] = new ArrayPropertyDescriptor(_owner.ColumnNames[i],type,i);
     }
     return new PropertyDescriptorCollection(prop);
 }