Hi,
In My ViewModel I have: public ObservableCollection<OrderModel> Orders { get; set; }
In OrderModel have: public IEnumerable<utOrderItem> OrderItems { get; set; }
I try to bind this OrderItems to a GridViewComboBoxColumn in RadGridView just to list them:
<telerik:RadGridView Grid.Row="1" Name="grdOrders" ItemsSource="{Binding Orders}" .............
<telerik:GridViewComboBoxColumn ItemsSource="{Binding Orders[].OrderItems}" Header="Order Items">
<telerik:GridViewComboBoxColumn.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Quantity}" />
<TextBlock Grid.Column="1" Text="{Binding ItemType}" />
<TextBlock Grid.Column="2" Text="{Binding UnitPrice}" />
</Grid>
</DataTemplate>
</telerik:GridViewComboBoxColumn.ItemTemplate>
</telerik:GridViewComboBoxColumn>
<telerik:GridViewDataColumn DataMemberBinding="{Binding OrderItems.Count}" Header="Order Item Count"/>
Column "Order Items" not show anything
Column "Order Item Count" works
Please advise how I can bind collection that exist in every record?
Best regards,
Saykor
In My ViewModel I have: public ObservableCollection<OrderModel> Orders { get; set; }
In OrderModel have: public IEnumerable<utOrderItem> OrderItems { get; set; }
I try to bind this OrderItems to a GridViewComboBoxColumn in RadGridView just to list them:
<telerik:RadGridView Grid.Row="1" Name="grdOrders" ItemsSource="{Binding Orders}" .............
<telerik:GridViewComboBoxColumn ItemsSource="{Binding Orders[].OrderItems}" Header="Order Items">
<telerik:GridViewComboBoxColumn.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Quantity}" />
<TextBlock Grid.Column="1" Text="{Binding ItemType}" />
<TextBlock Grid.Column="2" Text="{Binding UnitPrice}" />
</Grid>
</DataTemplate>
</telerik:GridViewComboBoxColumn.ItemTemplate>
</telerik:GridViewComboBoxColumn>
<telerik:GridViewDataColumn DataMemberBinding="{Binding OrderItems.Count}" Header="Order Item Count"/>
Column "Order Items" not show anything
Column "Order Item Count" works
Please advise how I can bind collection that exist in every record?
Best regards,
Saykor