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

ListView inside RadGridView

1 Answer 310 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rohit
Top achievements
Rank 1
Rohit asked on 28 Nov 2015, 12:00 PM
I added a ListView(Horizontal) inside a RadGridView such that every RadGrid row will have different number of ListView Items.How can I achieve this using MVVM (through view-model) ?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 02 Dec 2015, 04:21 PM
Hi Rohit,

As each collection would be specific for each row, I am afraid that you need to define different instances of this collection for each row. So, more appropriate in this case would be to define a child collection for each item present in the source collection of RadGridView, populate it with the number of elements needed and bind the ListView's ItemsSource to it.

I prepared a small sample as a demonstration of the approach. I hope it fits your requirements.

Note however, that such approach of using the control is not quite appropriate. I suggest you taking a look at the RowDetails topic for more information on the recommended usage of RadGridView in such scenarios.

Regards,
Stefan
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Rohit
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or