Sort on a typed list field

Posts   
 
    
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 29-Dec-2005 00:41:31   

Hi,

Is it possible to get a SortExpression from a typed list field index enum?

I would like to be able to have generic code that's able to create a SortExpression just from the column name of a typed list. But to specify the column to sort on whilst using a typed list one needs to specify the base entity's column.

This is difficult to do with generic code because one has to find out which base entity the typed list's column is from.

Cheers, I.

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 29-Dec-2005 02:57:22   

I would think that you could use typedlist.GetFieldsInfo()["columnname"] to submit the field that you would like to sort on.