ComboBox databinding

  • Thread starter Thread starter kitemad69
  • Start date Start date
K

kitemad69

I have a combobox and i have a datatable with 2 columns in it
(description and code) . Now how can i display the description but use
the code as the value member.
 
I have a combobox and i have a datatable with 2 columns in it
(description and code) . Now how can i display the description but use
the code as the value member.

And when i display the value member it just says code;
 
kitemad69,

You basically want to set the DisplayMember and ValueMember properties
to the name of the columns which contain the display member (description)
and value member (code).


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I have a combobox and i have a datatable with 2 columns in it
(description and code) . Now how can i display the description but use
the code as the value member.

And when i display the value member it just says code;
 
Back
Top