Tom

Tom

  • NA
  • 7
  • 0

2 dimensional data in combobox

Feb 20 2008 11:27 AM

I have 2 dimensional data (2,N) that is coming from a database (a bunch of product names and corresponding product IDs). I want to put this data in a combobox on a windows form, so that the display member is the product name and the value member is the product ID. However, I also want to to put some default text on the combo to say something like "Click here...", which will disappear when the user clicks to select an item.

What is the best way to do this? Should I use a dataset as the datasource of the combo? If so, how do I add the extra text? Alternatively, should I use an array or arraylist?