RadGrid In RadListView

2 posts, 1 answers
  1. Danny
    Danny avatar
    35 posts
    Member since:
    May 2012

    Posted 01 Oct 2013 Link to this post

    I have a DataTable:

    PO      Customer    Order   Product     Qty
    Alpha    Apple      30456   Napkins     400
    Alpha    Apple      30457   Pizza       200
    Alpha    Apple      30458   Schlitz     400
    Beta     Google     20001   Pizza       400
    Beta     Google     20002   Schlitz     200


    And a RadListView

    <telerik:RadListView>
           <ItemTemplate>
                        <asp:Label ID="lbl_PO" />
                        <asp:Label ID="lbl_Customer" />
                         <telerik:RadGrid>
                                 <telerik:GridBoundColumn DataField="Product" />
                                 <teleirk:GridBoundColumn DataField="Qty" />
                          </telerik:RadGrid>
             </ItemTemplate>
    </telerik:RadListView>

    The desired output is this

    PO: Alpha
    Customer: Apple
    ______________________
    | Order  | Product    |  Qty   |
    ______________________

    | 30456  | Napkins    |  400   |
    ______________________
    | 30457  | Pizza      |  200   |
    ______________________
    | 30458 | Schlitz    |  400   |
    ______________________
     
     
     
    PO: Beta
    Customer: Google
    ______________________
    | Order  | Product    |  Qty   |
    ______________________
    | 20001  | Pizza      |  400   |
    ______________________
    | 20002  | Schlitz    |  200   |
    ______________________

    My PO and customer will *always* be consistent across a range of orders.

    I want the common PO and customer to behave like 'rows' in the listview, while the grid still shows all the data relevant to the particular PO.   What's the general way to achieve this? 




  2. Answer
    Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 04 Oct 2013 Link to this post

    Hi Danny,

    In such scenarios we recommend using the RadGrid Grouping functionality. However, if you do not want to use RadGrid Grouping you could use the new RadListView DataGrouping shown in the demo below which implements the same scenario as shown in your description. Note that the functionality is currently available only in the new Beta release.

    Regards,
    Antonio Stoilkov
    Telerik
    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 the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top