Click here to Skip to main content
15,896,288 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have a repeater with the below design... Kindly suggest me doing sorting in repeater that has li and ul tags in header template

ASP.NET
 <asp:Repeater ID="rptFlights" runat="server" OnItemCommand="rptFlights_ItemCommand">
                               <HeaderTemplate>
                                   <div class="rt_header">
                                       <ul>
                                           <li class="airline_li">Airline</li>
                                           <li>Departure</li>
                                           <li>Arrival</li>
                                           <li>Duration</li>
                                           <li>Fare</li>
                                           <li></li>
                                       </ul>
                                   </div>
                               </HeaderTemplate>
                               <ItemTemplate>
                                   <div class="roundtrip_div">
                                       <!-- roundtrip_top --->
                                       <div class="roundtrip_top">
                                           <ul>
                                               <%#Eval("htmlString")%>
                                               <div class="book1_top">
                                                   <div>
                                                       <asp:Button ID="btnBookNow" runat="server" Text="Book" CssClass="book1_btn" CommandName="Book_Now" />
                                                       <asp:Label ID="FlightSegment" runat="server" Text='<%#Bind("FlightSegment") %>' Visible="false"></asp:Label>
                                                       <asp:Label ID="FormData" runat="server" Text='<%#Bind("FormData") %>' Visible="false"></asp:Label>
                                                       <asp:Label ID="Duration" runat="server" Text='<%#Bind("Duration") %>' Visible="false"></asp:Label>
                                                       <asp:Label ID="FlightID" runat="server" Text='<%#Bind("FlightID") %>' Visible="false"></asp:Label>
                                                       <asp:Label ID="ResBookDesigCode" runat="server" Text='<%#Bind("ResBookDesigCode") %>'
                                                           Visible="false"></asp:Label>
                                                       <asp:Label ID="SupplierCode" runat="server" Text='<%#Bind("SupplierCode") %>' Visible="false"></asp:Label>
                                                       <asp:Label ID="SupplierSystem" runat="server" Text='<%#Bind("SupplierSystem") %>'
                                                           Visible="false"></asp:Label>
                                                   </div>
                                               </div>
                                               <div class="book1_btm">


                                                <a href="#">  <asp:Label ID="hyDetails" runat="server" Text="Details"></asp:Label></a>

   <cc1:HoverMenuExtender ID="HoverMenuExtender1"  runat="server" TargetControlID="hyDetails" PopupControlID="panelDetails" PopupPosition="Right">
                   </cc1:HoverMenuExtender>
                   <asp:Panel ID="panelDetails" runat="server" BackColor="White" >
                   <%# Eval("htmlString1")%>

</asp:Panel>
                                               </div>
                                       </div>
                                       </li> </ul></div>
                                   </div>
                               </ItemTemplate>
                               <AlternatingItemTemplate>
                                   <div class="roundtrip_div" style="background: #fafafa;">
                                       <!-- roundtrip_top --->
                                       <div class="roundtrip_top">
                                           <ul>
                                               <%#Eval("htmlString")%>
                                               <div class="book1_top">
                                                   <div>
                                                       <asp:Button ID="btnBookNow" runat="server" Text="Book" CssClass="book1_btn" CommandName="Book_Now" />
                                                       <asp:Label ID="FlightSegment" runat="server" Text='<%#Bind("FlightSegment") %>' Visible="false"></asp:Label>
                                                       <asp:Label ID="FormData" runat="server" Text='<%#Bind("FormData") %>' Visible="false"></asp:Label>
                                                       <asp:Label ID="Duration" runat="server" Text='<%#Bind("Duration") %>' Visible="false"></asp:Label>
                                                       <asp:Label ID="FlightID" runat="server" Text='<%#Bind("FlightID") %>' Visible="false"></asp:Label>
                                                       <asp:Label ID="ResBookDesigCode" runat="server" Text='<%#Bind("ResBookDesigCode") %>'
                                                           Visible="false"></asp:Label>
                                                       <asp:Label ID="SupplierCode" runat="server" Text='<%#Bind("SupplierCode") %>' Visible="false"></asp:Label>
                                                       <asp:Label ID="SupplierSystem" runat="server" Text='<%#Bind("SupplierSystem") %>'
                                                           Visible="false"></asp:Label>
                                                   </div>
                                               </div>
                                               <div class="book1_btm">
                                                     <a href="#">  <asp:Label ID="hyDetails" runat="server" Text="Details"></asp:Label></a>


   <cc1:HoverMenuExtender ID="HoverMenuExtender1"  runat="server" TargetControlID="hyDetails" PopupControlID="panelDetails" PopupPosition="Right">
                   </cc1:HoverMenuExtender>
                   <asp:Panel ID="panelDetails" runat="server" BackColor="White" >
                   <%# Eval("htmlString1")%>

</asp:Panel>
                                               </div>
                                       </div>
                                       </li> </ul></div>
                                   </div>
                               </AlternatingItemTemplate>
                           </asp:Repeater>
Posted
Updated 9-Sep-13 22:54pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900