Hi telerik team,
I am trying to do listview column sort on header click. If I click once on header say ascending order and if already in ascending then descending order. I went through lot of trial but I am able to sort only with button outside listview.
Can you please direct me on how to do it.
<
I am trying to do listview column sort on header click. If I click once on header say ascending order and if already in ascending then descending order. I went through lot of trial but I am able to sort only with button outside listview.
Can you please direct me on how to do it.
<
<telerik:RadListView ID="RadListView1" runat="server" ItemPlaceholderID="ph1" ClientIDMode="Static" onsorting="RadListView1_Sorting" DataKeyNames="SiteID" DataSourceID="SqlDataSource1" AllowMultiFieldSorting="true"> <ItemTemplate> <tr align="left"> <td align="center"> <asp:Label ID="Label1" Text='<%#Eval("SiteID") %>' runat="server" /> </td> <td align="left"> <asp:Label ID="Label2" Text='<%#Eval("DisplayName") %>' runat="server" /> </td> <td > <asp:Label ID="Label3" Text='<%#Eval("RegularHrs") %>' runat="server" /> </td> <td > <asp:Label ID="Label4" Text='<%#Eval("OverTimeHrs") %>' runat="server" /> </td> </tr> </ItemTemplate> <LayoutTemplate> <center> <table cellpadding="10" cellspacing="0" class="stripe" width="100%" id="tblResults"> <tr> <td width="50" align="center"><a>ID</a></td> <td width="100" align="left"><a href="#" onclick="RadListView1_Sorting();return false;">Site Name</a></td> <td align="left"><h3>RH</h3></td> <td width="75" align="left"><h3>OTH</h3></td> <td width="135" align="left"><h3>Sent To</h3></td> </tr> <asp:PlaceHolder ID="ph1" runat="server" /> </table> </center> </LayoutTemplate> </telerik:RadListView>>