I am using WPF C# in my project. My UI contains 4 combo boxes ,each will be loaded by the values from database. Now all 4 comboboxes are displayed at a time. But what I want to do is,First combo box 1 should be visible/displayed then user selects a value say val1,then second combo box should be visible and it should contain values (from database) based on the val1 selected in combobox1 ,and so on. The combo boxes should be interrelated to previous combobox .
How can I achieve this task in WPF?
some of the XAML code: Please Select :
<Label Grid.Row="1">combobox1 :</Label>
<ComboBox Name="PL" Grid.Row="1" Grid.Column="1" Loaded="ComboBox_PLLoaded" SelectionChanged="ComboBox_PLSelectionChanged" />
<Label Grid.Row="2" HorizontalAlignment="Right">combobox2:</Label>
<ComboBox Name="Re" Grid.Row="2" Grid.Column="1" VerticalAlignment="Top" Loaded="ComboBox_RCLoaded" SelectionChanged="ComboBox_RCSelectionChanged"/>
<Label Grid.Row="3" Margin="89.216,0,60.581,26" Grid.RowSpan="2">combobox3 :</Label>
<ComboBox Name="CT" Grid.Row="3" Grid.Column="1" Loaded="ComboBox_RCLoaded" SelectionChanged="ComboBox_RCSelectionChanged"/>
<Label Grid.Row="4" HorizontalAlignment="Right">combobox4 :</Label>
<ComboBox Name="PT" Grid.Row="4" Grid.Column="1" />
</Grid>