Question : reorderlist sort descending

Hello,

Recently I've been working on a football depth chart web application.  I've been making use of the ajaxcontroltoolkit's reorderlist control with a sqldatasource in order to handle the reordering of individual players by position, and it works well.  However, for the second half of my application I need to show the list in reverse (e.g. instead of showing 1,2,3 top to bottom I need to show 1,2,3 bottom to top).  I changed my sql statement to sort descending instead of ascending, and on the initial view the data appears as desired.  When I reorder the list the items appear to act as expected, but the reorderlist does not update the database properly.  The sort order database field (in this case called playerdepth) values climb with each successive reorder and also refuse to save in the correct order.  

So my question: is it possible to sort this list from bottom to top and successfullly reorder it through the use of the reorderlist control?  I can post some code if need be, but it's a pretty simple implementation.     Any help is greatly appreciated.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
The data source, which renders correctly:

                        
                            
                                
                                
                            
                            
                                
                                
                            
                        


And the reorderlist: 

cc1:ReorderList ID="rePos1" runat="server" 
                            DataKeyField="DepthID" DataSourceID="dsPos1" PostBackOnReorder="False" 
                            SortOrderField="PlayerDepth" CssClass="reorderStyle" AllowReorder="True">
                            
                                

Answer : reorderlist sort descending

I don't see a way.  If you have the source code for the AJAX control toolkit 3.0, you can see that there is an internal method (ReorderList.DoReorderInternal), that performs the sorting.  It looks like it only handles ascending sorts.

private bool DoReorderInternal(IEnumerable dataSource, int oldIndex, int newIndex, DataSourceView dsv)
Random Solutions  
 
programming4us programming4us