Adding Select to Dropdown...

  • Thread starter Thread starter wink martindale
  • Start date Start date
W

wink martindale

Hello,

I am creating a vb.net app, using a mysql db.
I am connecting to the db, and filling some dropdowns with data.
My quesiton is: How can I make the first item (default item) in the
dropdown be "Select"? Do I have to put Select in the db or is there
another way???

TIA,

Daniel
 
wink martindale said:
Hello,

I am connecting to the db, and filling some dropdowns with data.
My quesiton is: How can I make the first item (default item) in the
dropdown be "Select"?

Personally, I avoid data binding controls to datasets/tables simply
because of problems like this. I'd read the data and load it into the
list myself. Anyway ...

Try modifying your SQL to bring back dummy row with "Select" in
it, something like :

select '(Select...)'
union
select RealColumn
from RealTable
Order By 1

HTH,
Phill W.
 
Back
Top