.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

reorderlist sort descending

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net

Im using Ajax Reorderlist.

It works just fine unless I change the Select statement to sort DESC.  Then the sort field (int) just accrues values instead of just switching them around.

Something I can do to make this work properly?  Id really prefer to sort this list in DESC order.

View Complete Post

More Related Resource Links

What is the meaning of Ascending\descending sort order of a column within an index

When I add a new index I can also specify the "sort order" as ascending or descending. What does it mean? does it affect performance? does it mean that the binary search tree will be set in a certain way?

In RB 2.0 how to sort in ascending/descending order as default?

I have column say of Provider Type which I want to be ordered when report is run so that all other columns are ordered according to the order of the Provider Type values.

How to sort GridView?

In this article I will discuss how to sort columns in grid and more. At the end it will help answer some very frequently asked questions like following

Sort by gridview SortExpression parameter via Stored Procedure


I have a gridview that calls data via a stored procedure.  I am unable to enable the gridview columns to be sortable. I need to set the parameter in the Stored Procedure, can someone help me with this?

Here is my gridview:

<asp:GridView ID="AllUsersGrid" runat="server" AutoGenerateColumns="False" DataKeyNames="UserName"
                        GridLines="Vertical" Width="900px" DataSourceID="SqlDataSource1" AllowSorting="True"
                        SelectedRowStyle-Height="30px" CellPadding="4" BackColor="White">
                            <asp:TemplateField HeaderText="Full Name" SortExpression="lastname">
                                    <asp:Label ID="DisplayName" runat="server" Text='<%# Eval("firstname").ToString() & " " & Eval("lastname").ToString() %>' />
                            <asp:BoundField HeaderText="User Name" DataField="UserName" />

Creating Reorderlist Programmatically


I hope to get some guidance on how to create reorder lists programmatically because of the situation described below. Thank you.

I have a page where I want to have a toDo Iist for each of several (typically 10) milestone categories. I can think of 3 options.

I don't know in advance how many 'active' categories there will be but I there is a known fixed total of about 20  categories, of which from 1 to 20 may be 'active'

1. Have one Master ReOrderList And Then Nest the Category ReorderLists Inside 

2. Create the reorderlists programmatically.

3. Brute force approach. Hardcode all 20 reorderlists and their associated sqldatasources, and then set visibility

depending on which category is active. This approach is the simplest but has the disadvantage of too much

repetitive code and the reorder lists would be in a fixed order, when I really want them to match the category order.




Looping through controls to find reorderlist to set allowreorder


How would I loop through controls on a content page to set allowreorder of all reorderlists to false. Thank you. 

Sort in array


  I have a collection Role[], in that i want to Sort Order by MerchantID, then RoleName ascending order, how its possible?

.Sort a List problem



I have a little problem with sorting a List<String>.

I have put 4 elements like this and now are trying sort them correct. My example below shows the problem. I am not sure of how sort the names so they comes in this order: "Folder1, Folder2, Folder10, Foler11"  ?

List<String> GetNames = new List<String>();

GetNames .Add("Folder1");
GetNames .Add("Folder10");
GetNames .Add("Folder2");
GetNames .Add("Folder11");

GetNames.Sort(); //Sort the list

The sort comes in this order now which is wrong:

How to sort the list to have this order: ?



listView Sort for a celltmplate column

hi , i have a list view with a column that is binded to a field in my database the field contains integers that represents the City_ID , and i a have another table that contains the cities and their ID's, so , when i apply the sort based on this column (City Column) the list View is sorted based on the integers not on the city names here is my XAML definition of that column : GridViewColumn Header="City_Name_ID" Width="75">                         <GridViewColumn.CellTemplate>                             <DataTemplate>                                 <ComboBox IsSynchronizedWithCurrentItem="False" ItemsSource="{Binding Source={StaticResource CitysViewSource}}" SelectedValue="{Binding Path=City_Name_ID}" SelectedValuePath="City_ID" DisplayMemberPath="City_Name"/>                      &nb

repeating merge joins using full outer join - should be possible without sort, but cannot get the co

Hello,   I am trying to combine several source tables with Merge Join.  For the Moment I have three source tables all already sorted in the source query and the is sorted property with the correct keys set. (its an aggregate query with group by and sort by the key columns) Then I do a merge join between two of the tables - with a full outer join. Then I just want to do another merge join with the output of the next result. but as the merge join do not combine the key columns into one column I need to add a derived column which substitute null values on the left side of the join with values from the right side of the join. The second merge then says only the left columns of the first merge join is sorted, but not the comined columns. If i Replace with a derived column the left side primary key columsn with the combinded key columns the next merge join says the input is not sorrted? But the output must be sorted. So how do I get the next merge join working without the ssis sort transformation? the data is sorted, but the component does not recognize the sorted data? I do not want to use (can use) the sort because there are flowing >= 500 Mio. records through the pipeline. Any help appreciated.   Hanneshttp://www.hmayer.net/

Looking for TSQL statement that returns customers with greatest number of order in descending order

What would be an efficient TSQL SELECT statement that joins customer and order tables, counts the orders for each customer (group by) and returns a result for all customers with at least one order, and also in descending order from customers with the most orders to the least?

How to specifically sort the data in a database using c#?

<!-- [if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:DontVertAlignCellWithSp/> <w:DontBreakConstrainedForcedTables/> <w:DontVertAlignInTxbx/> <w:Word11KerningPairs/> <w:CachedColBalance/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="--"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"

Sort WSS 3.0 Calendar by Start Date

I have read a few posts about people not being able to sort by start date on the calendar.  Was wondering if anyone has this figured out to sort by start date correctly with re-occuring appointments?  I have a code snippet from another post but do not know how to format it correctly as I am a new sharepoint user.  If someone can help with that that is also appreciated.  Thanks.  Code Below:  I basically have no idea to find the info requested below <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script> //today's date var today = new Date(); //get the Date var myDate = today.getDate(); //get the Month var myMonth = today.getMonth()+1; //get the Year var myYear=today.getYear(); //put date into a mm/dd/yyyy format var myDate = myMonth + "/" + myDate + "/" + myYear; //If this is on a webparts page, get the WP div id.  If it's on a list page, you don't need the webzone div ID. //Get the table and table class (usually it's .listviewtable, but if you've customized a webpart, sometimes it's .ms-summarycustombody.  //I used Todd Bleeker's "Style Under Cursor WebPart" to find the CSS class. $(function(){ $('div#WebPartWPQ3 table.ms-listviewtable tr:not(:contains("' + myDate 

Reorderlist not reordering

My Reorderlist is not reordering when I drag draghandle.ToolkitScriptManager is in masterpage. No errors & images & title show up display in reorder list.I have used similar code on different page that works. Image in Item template is coming from a database. Thanks <%@ Page Title="" Language="VB" MasterPageFile="~/sfcas_nofooter.master" AutoEventWireup="false" CodeFile="ImageView_ReorderList2.aspx.vb" Inherits="ImageView_ReorderList2" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <br /> <br /> <asp:Label ID="lblToDos" CssClass="label" Text="ToDos" runat="server" /> <asp:UpdatePanel ID="up1" runat="server" > <ContentTemplate> <div class="reorderListDemo"> <asp:Panel ID="pnlGeneral" runat="server" > <cc1:ReorderList ID="ReorderList_General" runat="server" PostBackOnReorder="true" Data

Custom Sort Values in a Group

Hello, I have a dataset from cube. Please assume the data is similar to below State  Product Sales CA      Bikes    100           Cars     10 MN    Trucks    16 GA    Cars      10        Boats       25   This is represented in a simple tablix and a group is formed on the State. I want to provide a custom sort order on the grouped field lets say i want GA first, followed by CA and then MN. How do i design such a solution? Thank you in advance for your advice.      

AllItems.apsx sort by expression missing

Hello, I am using SPD and would like to add a sort expression to my default view to sort a list - why is this feature not available and is there any way to do this? Thanks... 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend