Hello,
I have an issue where I need some help. I am creating an WPF MVVM application. I have a view with in it displayed a RadGridView. One of the columns of this gridview is a GridViewComboBoxColumn. See code
I have in the ViewModel a ObservableCollection named "ObservDistributions". This all works perfectly. The issue is where I change the value of the GridViewComboBoxColumn. I use MouseDoubleClick to send the changes from the View to the ViewModel. In the acb:CommandBehavior.CommandParameter I sent the item to the ViewModel with a command. This all works but not for the GridViewComboBoxColumn. The changes made to the GridViewComboBoxColumn are not sent to the ViewModel. I think the issue is with the DataMemberBinding in the GridViewComboBoxColumn. I have used the DateTimePickerColumn from Telerik, changes made with this control works fine.
Does anyone have some hint in what direction to look.
Thanx in advance
Stefan
I have an issue where I need some help. I am creating an WPF MVVM application. I have a view with in it displayed a RadGridView. One of the columns of this gridview is a GridViewComboBoxColumn. See code
<telerik:RadGridView x:Name="GridView" |
ItemsSource="{Binding DataContext.ObservDistributions, ElementName=DistributionView}" |
AutoGenerateColumns="False" |
CanUserFreezeColumns="False" |
acb:CommandBehavior.Event="MouseDoubleClick" |
acb:CommandBehavior.Command="{Binding SelectCurrentDistributionCommand}" |
acb:CommandBehavior.CommandParameter="{Binding ElementName=GridView, Path=SelectedItem}"> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}" IsReadOnly="True" /> |
<column:DateTimePickerColumn Header="Date" DataMemberBinding="{Binding DateFrom}" Width="200"></column:DateTimePickerColumn> |
<telerik:GridViewComboBoxColumn Header="Establishment" ItemsSource="{Binding DataContext.Establishments, ElementName=DistributionView}" SelectedValueMemberPath="EstablishmentId" DisplayMemberPath="Name" DataMemberBinding="{Binding Establishment.EstablishmentId, Mode=TwoWay}"> |
</telerik:GridViewComboBoxColumn> |
</telerik:RadGridView.Columns> |
</telerik:RadGridView> |
I have in the ViewModel a ObservableCollection named "ObservDistributions". This all works perfectly. The issue is where I change the value of the GridViewComboBoxColumn. I use MouseDoubleClick to send the changes from the View to the ViewModel. In the acb:CommandBehavior.CommandParameter I sent the item to the ViewModel with a command. This all works but not for the GridViewComboBoxColumn. The changes made to the GridViewComboBoxColumn are not sent to the ViewModel. I think the issue is with the DataMemberBinding in the GridViewComboBoxColumn. I have used the DateTimePickerColumn from Telerik, changes made with this control works fine.
Does anyone have some hint in what direction to look.
Thanx in advance
Stefan