-3

I want to show two columns in combobox dropdown. In this image dropdown shows only Company Id, I neet to show company Id and its name in dropdown. How to show it?? Please Help..

https://i.stack.imgur.com/x5Kuh.jpg

Pratyusha Terli
  • 2,343
  • 19
  • 31
Himesh
  • 458
  • 1
  • 3
  • 15
  • 1
    possibly duplicate - http://stackoverflow.com/questions/1091414/winforms-combobox-with-multiple-columns-c – DevT Nov 22 '12 at 05:25
  • duplicates - http://stackoverflow.com/questions/3189132/combobox-with-multiple-columns – DevT Nov 22 '12 at 05:29

1 Answers1

0

In sql query, you can concatenate the Company id and Name. So you can display both.

Eg: select CompanyID+' '+CompanyName as Company,Id from yourtable

Vijaychandar
  • 716
  • 5
  • 21