Hello!
I'm struggling from a few days with a problem in my wpf application:
I have to create a structure similar to the one in telerik demos of which I attach a screenshot. It is a RadGridView with hierarchy.
In child grid I have to add a RadComboBox Column and it works fine until I simply put some values in this combo. My task Is to modify the Data Template of the Comboboxcolumn and insert a radgridview.
I'm facing a lot of problem in doing that and in binding data to the Grid. I succesfully create the structure but I'm not able to bind data in code behind.
This is a piece of my code, and attached is the example structure I want to upgrade.
Someone has a sample project or some suggestions to accomplish this task?
I'm struggling from a few days with a problem in my wpf application:
I have to create a structure similar to the one in telerik demos of which I attach a screenshot. It is a RadGridView with hierarchy.
In child grid I have to add a RadComboBox Column and it works fine until I simply put some values in this combo. My task Is to modify the Data Template of the Comboboxcolumn and insert a radgridview.
I'm facing a lot of problem in doing that and in binding data to the Grid. I succesfully create the structure but I'm not able to bind data in code behind.
This is a piece of my code, and attached is the example structure I want to upgrade.
<telerik:RadGridView Margin="15,5,15,5" Name="gvRequest" Height="auto" Width="Auto" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" telerik:StyleManager.Theme="Simple" AutoGenerateColumns="False" IsFilteringAllowed="False" FlowDirection="LeftToRight" ShowGroupPanel="False"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn UniqueName="Codice" Header="Codice" Width="Auto" /> <telerik:GridViewDataColumn UniqueName="UtenteCreazione" Header="UtenteCreazione" Width="Auto" /> <telerik:GridViewDataColumn UniqueName="IDContatore" Header="IDContatore" Width="Auto" /> <telerik:GridViewDataColumn UniqueName="ModuloStampa" Header="ModuloStampa" Width="Auto" /> </telerik:RadGridView.Columns> <telerik:RadGridView.HierarchyChildTemplate> <DataTemplate> <StackPanel DataContext="{x:Null}"> <telerik:RadGridView CanUserReorderColumns="False" Name="gvOrder" CanUserInsertRows="True" ShowInsertRow="True" CanUserDeleteRows="True" CanUserFreezeColumns="False" ShowGroupPanel="False" AutoGenerateColumns="False" ItemsSource="{Binding}" Loaded="OnChildGridLoaded" FlowDirection="LeftToRight" IsFilteringAllowed="False" ShowColumnHeaders="True" ColumnBackground="AliceBlue" HorizontalContentAlignment="Right" ClipToBounds="True"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn UniqueName="id" Header="id" Width="Auto" /> <telerik:GridViewDataColumn UniqueName="Data" Header="Data" Width="Auto" /> <telerik:GridViewDataColumn UniqueName="UtenteCreazione" Header="UtenteCreazione" Width="Auto" /> <telerik:GridViewComboBoxColumn UniqueName="numero" Header="Numero" Width="Auto" DataMemberBinding="{Binding numero, Mode=TwoWay}" DisplayMemberPath="NomeUtente" SelectedValueMemberPath="IDUtente" SortMemberPath="NomeUtente" SortingState="Ascending" /><telerik:GridViewComboBoxColumn UniqueName="numero2" Header="Numero2" Width="Auto" DataMemberBinding="{Binding numero, Mode=TwoWay}" ItemsSource="{Binding Source={StaticResource CustomersViewSourcefil}}" DisplayMemberPath="{Binding Path=RadGrigliaUtenti.NomeUtente}"> <telerik:GridViewComboBoxColumn.ItemTemplate> <DataTemplate> <telerik:RadGridView FilteringMode="FilterRow" x:Name="RadGrigliaUtenti" AutoGenerateColumns="False" ShowGroupPanel="False" CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed" IsReadOnly="True" MinWidth="300" MaxWidth="600" IsFilteringAllowed="True" ItemsSource="{Binding Source={StaticResource CustomersViewSource}}" Height="150" SelectedItem="{Binding Path=numero}" > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="IDUtente" Width="120" DataMemberBinding="{Binding IDUtente}" IsReadOnly="True"></telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="NomeUtente" Width="*" DataMemberBinding="{Binding NomeUtente}" IsReadOnly="True"></telerik:GridViewDataColumn> </telerik:RadGridView.Columns> </telerik:RadGridView> </DataTemplate> </telerik:GridViewComboBoxColumn.ItemTemplate></telerik:GridViewComboBoxColumn> </telerik:RadGridView.Columns> </telerik:RadGridView> </StackPanel> </DataTemplate> </telerik:RadGridView.HierarchyChildTemplate> </telerik:RadGridView></Window>Someone has a sample project or some suggestions to accomplish this task?