K
kashifsulemani
Combo Box DropDown Style.
A combo box is bound to a data table field name.
When combo box has simple / drop down style then bound is successful.
Other hand if Combo box has drop down list style then bound is
successful but combo box not show data field names.
E.g
1.
cmbName.DropDownStyle =
System.Windows.Forms.ComboBoxStyle.DropDownList ;
cmbName.DataBindings.Clear();
cmbNameOTR.DataBindings.Add("text", dt, dt.Columns["Name"].Caption);
Here in above code data binding is successful but did not show
anything.
2.
cmbName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown ;
cmbName.DataBindings.Clear();
cmbNameOTR.DataBindings.Add("text", dt, dt.Columns["Name"].Caption);
Here in this example when combo box has Simple or drop down style then
it responses good, with data binding and displaying data as well.
A combo box is bound to a data table field name.
When combo box has simple / drop down style then bound is successful.
Other hand if Combo box has drop down list style then bound is
successful but combo box not show data field names.
E.g
1.
cmbName.DropDownStyle =
System.Windows.Forms.ComboBoxStyle.DropDownList ;
cmbName.DataBindings.Clear();
cmbNameOTR.DataBindings.Add("text", dt, dt.Columns["Name"].Caption);
Here in above code data binding is successful but did not show
anything.
2.
cmbName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown ;
cmbName.DataBindings.Clear();
cmbNameOTR.DataBindings.Add("text", dt, dt.Columns["Name"].Caption);
Here in this example when combo box has Simple or drop down style then
it responses good, with data binding and displaying data as well.