This question is locked. New answers and comments are not allowed.
Hi,
Someone can explain how I can get the Selected Item in ComboBox?
I want bind the selected Item to one variable in my ViewModel.
I did this code:
In my ItemsSource I did this:
because the "OCTiposNotificacao" is a second collection, that means that I have two collections in my ViewModel, so I declare like Path=DataContext.OCTiposNotificacao.
And I want bind the Selected Item to TipoNotificacaoSeleccionado.
But all I get is a null value...
Any help?
Thanks
Someone can explain how I can get the Selected Item in ComboBox?
I want bind the selected Item to one variable in my ViewModel.
I did this code:
<telerik:RadComboBox Grid.Column="1" Grid.Row="1" Width="100" Height="20" HorizontalAlignment="Left" ItemsSource="{Binding Path=DataContext.OCTiposNotificacao, ElementName=LayoutRoot2}" DisplayMemberPath="DesignacaoProp" telerik:StyleManager.Theme="Expression_Dark" SelectedItem="{Binding Path=DataContext.TipoNotificacaoSeleccionado, Mode=TwoWay}" />In my ItemsSource I did this:
ItemsSource="{Binding Path=DataContext.OCTiposNotificacao, ElementName=LayoutRoot2}"because the "OCTiposNotificacao" is a second collection, that means that I have two collections in my ViewModel, so I declare like Path=DataContext.OCTiposNotificacao.
And I want bind the Selected Item to TipoNotificacaoSeleccionado.
But all I get is a null value...
Any help?
Thanks