Home All Groups Group Topic Archive Search About

Custom Attributes and properties ordering

Author
7 Jan 2007 4:05 PM
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?

Author
7 Jan 2007 6:42 PM
Joanna Carter [TeamB]
"polymedes" <goo***@papadimitriou.info> a écrit dans le message de news:
1168185911.427037.103***@51g2000cwl.googlegroups.com...

| 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

--
Joanna Carter [TeamB]
Consultant Software Engineer

AddThis Social Bookmark Button