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

GridView Row details

1 Answer 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Artem
Top achievements
Rank 1
Artem asked on 04 Apr 2011, 06:57 AM
Hi.
I look on this demo
http://demos.telerik.com/silverlight/#GridView/FirstLook
And I can't understand how I can add row detail if I have 2 lists.
I have 2 list
- order(id, number, date)
- order detail (row_id, order_id, product, prod_count)

How can I add row detail to gridView?
I wan load order detail list when user toggle row.

for example I see 10 row. when I click on
+ I wan load into row detail info about this order.
How can I do this?

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 04 Apr 2011, 04:09 PM
Hello sharp,

You can show the grid rows with their row details when expanding the grid row by:
  • Define <DataTemplate x:Key="RowDetailsTemplate"> in Grid.Resources and inside it define RadGridView binded to OrderDetails with the appropriate bindings for the columns
  • Bind the Orders collection to RadGridView with the the appropriate bindings for its columns
  •  In Orders RadGridView set the property RowDetailsTemplate="{StaticResource RowDetailsTemplate}"

I have attached a sample project, showing how this is done for data collections Club and Players(in the Club). By following this example you should be able to implement your particular scenario (Orders instead of Club and OrderDetails instead of Players).

 Regards,
Didie
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Artem
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or