How to add additional text to a bound combobox
-
hello , i am using a combobox which is bound to a dataset with a bindingsource i have set the displayMember to one of the dataset columns , what i want to do is add some additional text to the elements displayed text in the combobox , for example to the first element i would like to add '1' and to the 2nd element '2' .... any idea how i might do that ? thank you very much in advance!
Net
-
hello , i am using a combobox which is bound to a dataset with a bindingsource i have set the displayMember to one of the dataset columns , what i want to do is add some additional text to the elements displayed text in the combobox , for example to the first element i would like to add '1' and to the 2nd element '2' .... any idea how i might do that ? thank you very much in advance!
Net
hi friend... i got one solution dt... dn't set displymember and datasouceid property... just fill adapter and dataset... code:. Adapter.Fill(datset.xyztable); for(int i=0;i<datset.xyztable.rows.count;i++)> { combobox1.Items.Add(i+"-"+datset.xyztable.Rows[i]["columnname"].Tostring()); }