Sorting TypeList!

Posts   
 
    
Posts: 14
Joined: 09-Sep-2007
# Posted on: 08-Nov-2007 14:07:52   

I have a TypeList which is name OrderTypeList.I wanna sort data by OrderDate.I can do this.But I need one more thing.I wanna sort some data below the other orders.These data are OrderStateID is equal 11.

I wanna show data like below:

CustomerName City OrderStateID OrderDate


John Utah 1 15/06/2007 Mike Atlanta 8 16/06/2007 Sarr Boston 7 17/06/2007 Kate Utah 2 18/06/2007 Jack Florida 2 28/06/2007 Steve Arizona 11 18/06/2007 Macey Chicago 11 17/06/2007 Diego Alabama 11 15/06/2007

Thanks for helps

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 08-Nov-2007 14:21:21   

I don't think this is easily doable in SQL. If you know how, can you please post the SQL Query to produce the mentioned ordered resultsSet. Otherwise, I'd say you have to do it manually in code (maybe BL), loop in the TL and re-arrange the rows.

Or you might get the same results by fetching twice into the same TypedList. Once with (OrderStateID != 11) filter. And the other one wiht (OrderStateID == 11) filter.