Additional text into 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
Add the information into the dataset before binding. You cannot do this via the combo, you need to manipulate the underlying data.
Never underestimate the power of human stupidity RAH
-
Add the information into the dataset before binding. You cannot do this via the combo, you need to manipulate the underlying data.
Never underestimate the power of human stupidity RAH
there is no toString() method that i could override to get that results? , altering the data seems a bit extreme for this task and the problem is the selected element in the combobox is also bound to some other text box that i would like to stay as it is.
Net
-
there is no toString() method that i could override to get that results? , altering the data seems a bit extreme for this task and the problem is the selected element in the combobox is also bound to some other text box that i would like to stay as it is.
Net
You're problem is that the combo does not control the data, that is completely at the mercy of the underlying dataset. You could add another field to the dataset purely for combo display, bind the display member to the combo field and the textbox the the original field. What you are not going to be able to do is fiddle with the data via the combo control.
Never underestimate the power of human stupidity RAH