Hi friends, I want to display data from the database in combobox, the DB table has id, investPlan, amount. Now I want to show investGln colover in combobox, and when the user selects any plan, then the corresponding amount is displayed in the textBox control. I can display the lines of 'invetsPlan' in a comboBox, but I don’t know how to do anything to relax. HELP ME !!
XAML part
<ComboBox Height="23" Margin="70,72,88,0" Name="comboBox1" VerticalAlignment="Top" DropDownClosed="comboBox1_DropDownClosed"
ItemsSource="{Binding}" IsSynchronizedWithCurrentItem="True" SelectedValue="{Binding Path=id}" DisplayMemberPath="fullName" SelectedValuePath="id"/>
Code piece by piece
private void Window_Loaded(object sender, RoutedEventArgs e)
{
DataSet1TableAdapters.membersTableAdapter ta = new ComboBoxDB.DataSet1TableAdapters.membersTableAdapter();
comboBox1.ItemsSource = ta.GetData();
}
RAJ K source
share