I have searched everywhere but im not able to determine if you can show two or more data fields in a combo box. If so can anyone help me with the code to do so as I am stumped. Thanks in advance.

Recommended Answers

All 2 Replies

Are you after a combobox that basically has two columns in it, such as a first and last name on one row in 2 columns?

I have searched everywhere but im not able to determine if you can show two or more data fields in a combo box. If so can anyone help me with the code to do so as I am stumped. Thanks in advance.

You may do so by creating a user control. User control may includes TextBox and a DataGrid controls. With built-in Combo control, you may concat fields of table with select query.
For example,

MS-SQL : select tno, tname + ' ' + taddress as data from tablename
Oracle : select tno,tname || ' ' || taddress as data from tablename

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.