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

dynamic number of GridViews

3 Answers 18 Views
GridView
This is a migrated thread and some comments may be shown as answers.
lina fetisova
Top achievements
Rank 1
lina fetisova asked on 27 May 2010, 07:25 AM
sorry, can you tell me how can I post a dynamic number of GridViews to my form?
I have dynamic number of categories and  I want to make a GridView to each category.
how can I do this?
maybe a GridView in a GridView?

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 27 May 2010, 07:29 AM
Hello,

You can use plain ItemsControl instead and define RadGridView in ItemsControl ItemTemplate. For example:

<ItemsControl ItemsSource="{Binding YourSource}">
   <ItemsControl.ItemTemplate>
      <DataTemplate>
          <telerik:RadGridView ItemsSource="{Binding YourChildProperty}" />
      </DataTemplate>
   </ItemsControl.ItemTemplate>
</ItemsControl>

All the best,
Vlad
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.
0
lina fetisova
Top achievements
Rank 1
answered on 27 May 2010, 10:45 AM
thank you! but what should I do if YourChildProperty is not a ChildProperty, but a result of some method of YourSource?
0
Vlad
Telerik team
answered on 27 May 2010, 11:43 AM
Hello,

You can always prepare view-model that will have desired properties and wrap your original data.

Regards,
Vlad
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
lina fetisova
Top achievements
Rank 1
Answers by
Vlad
Telerik team
lina fetisova
Top achievements
Rank 1
Share this question
or