Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a selectionlist with a value

Status
Not open for further replies.

kifaro

Programmer
Oct 4, 2002
54
US
I have a selectionlist with a value of 85, how do I set it to being selected?

I tried this but the indexes are 1,2,3,4:
slTech.SelectedIndex =Convert.ToInt32(olHours.Selection["UserID"]);

I am looking for something like this (it doesn't work like this)
//slTech.Selection.Value="85";

If it matters this is C# w/ MMIT

Thanks,
Aaron
 
This Worked:
listBox1.SelectedItem = "85";
 
This is a selectionlist not list box. It is differnt with MMIT. I got an answer from MS and it seems you have to loop through the values then set selected=true.

Thanks, Aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top