Adding Select to Dropdown...

  • Thread starter wink martindale
  • 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
 
P

Phill. W

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top