Click here to Skip to main content
15,890,399 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
ComboBox 1

< combobox grid.column="1" grid.row="1" height="23" horizontalalignment="Center" margin="2,2,0,0" name="comboBoxServer" verticalalignment="Top" width="156" itemssource="{Binding Path=ServerNameList, Mode=OneWay}" selectedindex="0" selecteditem="{Binding SelectedIndex}" selectionchanged="comboBoxServer_SelectionChanged" text="{Binding selectedServer, Mode=OneWayToSource,UpdateSourceTrigger=PropertyChanged}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
< i:InvokeCommandAction Command="{Binding serverCommand}" CommandParameter="{Binding ElementName=comboBoxServer, Path=SelectedValue}"/>
< /i:EventTrigger>
</i:Interaction.Triggers>

</combobox>

ComboBox 2

< ComboBox Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Center" Margin="2,2,0,0" Name="comboBoxDBName" VerticalAlignment="Top" Width="156" ItemsSource="{Binding Path=DBNameList, Mode=OneWay}" SelectedItem="{Binding serverSelected, Mode=TwoWay}" >
< /ComboBox>

I want that based on first combobox selection, my second combobox gets populated.
Posted
Updated 29-Oct-15 18:52pm
v2
Comments
VR Karthikeyan 30-Oct-15 0:51am    
What have you tried? Just show your code. You can bind a property with combobox selection and you can use it as combobox selected value.
Member 12002095 30-Oct-15 0:53am    
I have updated my question. Please check and help me now.

1 solution

Hi, Check the following answer,
Answer
 
Share this answer
 

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

  Print Answers RSS


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