4
Answers

how to display 2 values from database to the combobox control e.g. "1-abc"

Ninds

Ninds

13y
2.3k
1


hi ,
i m new to c#;
In my desktop application i want to show combobox as follows:

1-abc
2-def
3-ghi

etc.

my database table structure is :
 id   description
 1     abc
 2     def
 3     ghi

In short i want something like
 combo1.displaymember="id-description";
and
combo1.valuemember="id";

please suggest me possible workaround for this

Answers (4)