Custom Attributes and properties ordering

  • Thread starter Thread starter polymedes
  • Start date Start date
P

polymedes

Is there any common practice for ordering of an object's properties?
Think this as an example: You have a List<OfClass> and you provide an
instance of this list as Datasource to a grid. Is there any custom
attribute that IF it will be taken into account, the grid's columns
will reflect a "custom" ordering or the class's properties?

If one provides an instance of a List<OfClass> to a datagrid, what will
the order of the columns be?
 
"polymedes" <[email protected]> a écrit dans le message de (e-mail address removed)...

| Is there any common practice for ordering of an object's properties?
| Think this as an example: You have a List<OfClass> and you provide an
| instance of this list as Datasource to a grid. Is there any custom
| attribute that IF it will be taken into account, the grid's columns
| will reflect a "custom" ordering or the class's properties?
|
| If one provides an instance of a List<OfClass> to a datagrid, what will
| the order of the columns be?

Look at creating a custom TypeDescriptor for your type, this can ensure that
the columns are in order.

Joanna
 
Back
Top