Wednesday, December 14, 2011

Binding to a DataSource Controls.

Binding to a Datasource Controls
-----------------------------------
Dictionary<int, string> source= PetDataAccess.GetStateByCountryId(stateId);
comboBox.DataSource = new BindingSource(breeds, null);                                        comboBox.DisplayMember = "value";
comboBox.ValueMember = "key";

No comments:

Post a Comment