[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ComboBox

Posted on 2005-05-05
4
Medium Priority
?
266 Views
Last Modified: 2010-04-23
In VB.NET 2003, if I have a ComboBox populated with a couple of items, and I want to programatically display a certain item, say item number 3, how do I do that?
0
Comment
Question by:SETP
  • 2
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 1000 total points
ID: 13934187
comboBox1.SelectedItem = 3;

(or 2 - items index is 0-based).
0
 

Author Comment

by:SETP
ID: 13934416
Actually, I was also trying that but it wasn'y working. Then I figured it out, it's

combobox1.SelectedIndex = 2, not
combobox1.SelectedItem

But I'll give you the points anyway for the help. Thanks AlexFM
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 13934439
Damn, I wanted to write SelectedIndex but copied from the wrong place. I must read my posts before clicking Submit :-(
0
 

Author Comment

by:SETP
ID: 13934531
Don't worry about it. Happened to me in the past too! Thanks for your support anyways.

Regards
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Screencast - Getting to Know the Pipeline
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question