Click here to Skip to main content
15,898,678 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i gets previously selected value when using ComboboxName.SelectedItem code in selection changed events of the combobox. i used datatable to bind combobox.
Posted
Updated 31-Jul-12 22:59pm
v2
Comments
Kenneth Haugland 1-Aug-12 4:50am    
Without you showing/explaining how your code works, I cant help you. It sounds like you forgot something becouse the combobox its not supposed to work like that.
Keith Barrow 1-Aug-12 5:03am    
Please give the code you are using, otherwise we are working blind. Also, you don't ask a question, is this what you want to do or what you have done?

1 solution

Since this question is rather vague I'll post an example combobox of mine :

<ComboBox x:Name="ActieComboBox" Grid.Column="1" Grid.Row="4" Margin="2" ItemsSource="{Binding Source={StaticResource ProjectTaakCategorieViewSource}}" ItemTemplate="{StaticResource ProjectTakenComboBoxItemTemplate}" SelectedValuePath="TaakCategorieId" SelectedValue="{Binding CategorieId,Mode=TwoWay}" />


Important stuff is that the selectedValue uses twoway binding
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900