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

RadGrid In RadListView

1 Answer 65 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Danny
Top achievements
Rank 2
Danny asked on 01 Oct 2013, 01:33 PM
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? 




1 Answer, 1 is accepted

Sort by
0
Accepted
Antonio Stoilkov
Telerik team
answered on 04 Oct 2013, 09:44 AM
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.
Tags
ListView
Asked by
Danny
Top achievements
Rank 2
Answers by
Antonio Stoilkov
Telerik team
Share this question
or