Hi,
Below is a nested itemscontrol snippet.
My problem is in the child itemscontrol i have a telerik radgridview to which i am attaching a datatable(the implementation provided by Vlad) my datatable might contain any number of columns based on my data coming from an X datasource. My question is it possible to hook up the gridviewdatacolumns to the telerik radgridview based on my datatable's columns via MVVM or any other way ? This specific implementation is needed because i need the pager control attached to this nested itemscontrol restricting the number of radgrids for each employee name.
In the screenshot AA0 , AA1 , AA2 are employee names and each have three sets of data(three radgrids) screenshot shows only 2 radgris because pagesize is 2. I have attached a screenshot when a paging is clicked as well.
Any help would be greatly appreciated.
<ItemsControl Grid.Row="1" ItemsSource="{Binding EmpList}" Grid.Column="0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="4*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Path=EmployeeName}"
HorizontalAlignment="Left"
Grid.Row="0"
Margin="3"
Grid.Column="0">
</TextBlock>
<sdk:DataPager Name="dataPager1"
PageSize="2"
Grid.Row="0"
Grid.Column="2"
DisplayMode="FirstLastPreviousNextNumeric"
NumericButtonCount="2"
Source="{Binding Path=PageView}"
Visibility="{Binding Path=IsDataPagerVisible}"/>
<ItemsControl ItemsSource="{Binding Path=PageView}"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<telerik:RadGridView ItemsSource="{Binding Path=EmpDetailGrid}"
AutoGenerateColumns="False"
RowIndicatorVisibility="Collapsed"
BorderThickness="0"
ShowGroupPanel="False"
IsReadOnly="True">
</telerik:RadGridView>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Thanks & Regards,
Keerti Somasundaram
Below is a nested itemscontrol snippet.
My problem is in the child itemscontrol i have a telerik radgridview to which i am attaching a datatable(the implementation provided by Vlad) my datatable might contain any number of columns based on my data coming from an X datasource. My question is it possible to hook up the gridviewdatacolumns to the telerik radgridview based on my datatable's columns via MVVM or any other way ? This specific implementation is needed because i need the pager control attached to this nested itemscontrol restricting the number of radgrids for each employee name.
In the screenshot AA0 , AA1 , AA2 are employee names and each have three sets of data(three radgrids) screenshot shows only 2 radgris because pagesize is 2. I have attached a screenshot when a paging is clicked as well.
Any help would be greatly appreciated.
<ItemsControl Grid.Row="1" ItemsSource="{Binding EmpList}" Grid.Column="0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="4*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Path=EmployeeName}"
HorizontalAlignment="Left"
Grid.Row="0"
Margin="3"
Grid.Column="0">
</TextBlock>
<sdk:DataPager Name="dataPager1"
PageSize="2"
Grid.Row="0"
Grid.Column="2"
DisplayMode="FirstLastPreviousNextNumeric"
NumericButtonCount="2"
Source="{Binding Path=PageView}"
Visibility="{Binding Path=IsDataPagerVisible}"/>
<ItemsControl ItemsSource="{Binding Path=PageView}"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<telerik:RadGridView ItemsSource="{Binding Path=EmpDetailGrid}"
AutoGenerateColumns="False"
RowIndicatorVisibility="Collapsed"
BorderThickness="0"
ShowGroupPanel="False"
IsReadOnly="True">
</telerik:RadGridView>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Thanks & Regards,
Keerti Somasundaram