This is a migrated thread and some comments may be shown as answers.

Is there a way to group by category/type in RadListView

3 Answers 159 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Gary Meagher
Top achievements
Rank 1
Gary Meagher asked on 03 Dec 2010, 04:33 PM
I have list of products displayed in a RadListView. I would like to group those products by Category (where Category is a property of the Product class)
Is that even possible using RadListView?

In your samples, you only have basic grouping using a predefined number of items per group.
Thanks,
Gary


Here is the code I'm using:
<telerik:RadListView ID="listViewProducts" runat="server"
       onneeddatasource="listViewProducts_NeedDataSource" ItemPlaceholderID="ProductsHolder"        
      DataKeyNames="ProductCatalogID" >
                 <AlternatingItemTemplate>
                 <div class="rlvA" style="height: 160px; width: 200px; margin-top: 5px;
                               margin-right: 5px; margin-bottom: 5px; padding-left: 5px;">
                               <table cellpadding="1" cellspacing="1" border="0" width="200">
                                   <tr style="height:60px;">
                                   <td class="header4" ><%#Eval("Products")%></td>
                                   </tr>
                                   <tr>
                                   <td align="center"><%--<asp:ImageButton ID="ImageButton2" ImageUrl="~/Images/Product.jpg" PostBackUrl='<%# Eval("Link")%>' runat="server" target="_blank" />--%>
                                   <asp:ImageButton ID="ImageButton1" ImageUrl="~/Images/Product.jpg"  runat="server" OnClientClick=<%# "window.open('" + Eval("Link") + "','',''); return false;" %>  /></td>
                                   </tr>
                               </table>
                                       
 
                           </div>
                       </AlternatingItemTemplate>
                       <ItemTemplate>
                       <div class="rlvI" style="height: 160px; width: 200px; margin-top: 5px;
                               margin-right: 5px; margin-bottom: 5px; padding-left: 5px;">
                               <table cellpadding="1" cellspacing="1" border="0" width="200">
                                   <tr style="height:60px;">
                                   <td class="header4"><%#Eval("Products")%></td>
                                   </tr>
                                   <tr>
                                   <td align="center"><asp:ImageButton ID="ImageButton3" ImageUrl="~/Images/Product.jpg"  runat="server" OnClientClick=<%# "window.open('" + Eval("Link") + "','',''); return false;" %>  /></td>
                                   </tr>
                               </table>
                                
                       
                        
                       </div>
                       
                       </ItemTemplate>
                       <EmptyDataTemplate>
                           <div class="RadListView RadListView_Windows7">
                               <div class="rlvEmpty">
                                   There are no items to be displayed.</div>
                           </div>
                       </EmptyDataTemplate>
                       <LayoutTemplate>
                           <div style="width:1150px;" class="RadListView RadListViewFloated RadListView_Windows7">
                               <div class="rlvFloated rlvAutoScroll">
                                   <div id="Div1" runat="server">
                                     <div id="ProductsHolder" runat="server">
                                   </div>
                               </div>
 
                           </div>
                       </LayoutTemplate>
                      
      
   </telerik:RadListView>

3 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 07 Dec 2010, 11:45 AM
Hi Gary,

RadListView does not provide grouping by category for now. You can use RadGrid instead of RadListView.

All the best,
Vasil
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Mandy
Top achievements
Rank 2
answered on 23 Mar 2012, 07:30 PM
Hello Admin,

Is this functionality still unavailable? or it is available in new version of Telerik.

Thanks
0
Vasil
Telerik team
answered on 26 Mar 2012, 09:47 AM
Hello Mandeep,

Yes such functionality is still not implemented. If you are interested you could vote for it in PITS here:
ADD RadListView data grouping and aggregates.

All the best,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListView
Asked by
Gary Meagher
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Mandy
Top achievements
Rank 2
Share this question
or