Custom Attributes and properties ordering

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?
 
J

Joanna Carter [TeamB]

"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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top