G
Guest
I have recently migrated to VS.Net 2005, and I am struggling to do something
very basic with the combo box. I want to manually loop through a data table
and add both the display text and the value manually. The reason I cannot
bind the combo box to my data table is that there are more than one field
that I want to combine to be the display member. So what I had to do was
create yet another data table at run time (or an array list) and combine the
columns in my new data table so it would display the way I want it to. This
is much more code than simply lookping through my original data table and
adding the item and setting the value manually. I don't want to have to do
this for every combo box in the application. is it possible to set the value
member of a combo box item without binding it to a data source?
I also noticed that when I set the display member to a field that has a
space in it (i.e. [last name]) the value member displays.
very basic with the combo box. I want to manually loop through a data table
and add both the display text and the value manually. The reason I cannot
bind the combo box to my data table is that there are more than one field
that I want to combine to be the display member. So what I had to do was
create yet another data table at run time (or an array list) and combine the
columns in my new data table so it would display the way I want it to. This
is much more code than simply lookping through my original data table and
adding the item and setting the value manually. I don't want to have to do
this for every combo box in the application. is it possible to set the value
member of a combo box item without binding it to a data source?
I also noticed that when I set the display member to a field that has a
space in it (i.e. [last name]) the value member displays.