Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ComboBox Height="23" HorizontalAlignment="Right" Margin="0,43,140,0" Name="comboBox2" VerticalAlignment="Top" Width="169" IsEditable="True" IsTextSearchEnabled="True"/>
- public void BindMedicalStoreComboBox(ComboBox comboBox1)
- {
- SqlDataAdapter da = new SqlDataAdapter("Select medical_store_id,m_store_name FROM medical_store", con);
- DataSet ds = new DataSet();
- da.Fill(ds, "medical_store");
- comboBox2.ItemsSource = ds.Tables[0].DefaultView;
- comboBox2.DisplayMemberPath = ds.Tables[0].Columns["m_store_name"].ToString();
- comboBox2.SelectedValuePath = ds.Tables[0].Columns["medical_store_id"].ToString();
- }
Add Comment
Please, Sign In to add comment