changing the text of one value in a drop-down list

D

darrel

I'm binding data to a drop down list. Then, via another query, selecting one
of the items from that list by default.

What I'd like to do is change the text of that particular item as well. Can
that be done?

For instance, the list may be:

apple
orange
banana

then, I make the second query, find out this record should be set to orange,
and then I want to change the text as such:

apple
orange*
banana

to indicate what the current value is (so if someone selects it, but wants
to set it back to the 'last state' they can easily see which one it is.)

-Darrel
 
D

darrel

I'm binding data to a drop down list. Then, via another query, selecting
one
of the items from that list by default.

What I'd like to do is change the text of that particular item as well. Can
that be done?

Well, figured it out just after I posted!

DDL_bondingCo.SelectedValue = ds.Tables(0).rows(0)("bondingID").tostring



DDL_bondingCo.Items.FindByValue(ds.Tables(0).rows(0)("bondingID").tostring).
Text =

DDL_bondingCo.SelectedItem.Text.tostring & "*"



-Darrel
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top