DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Location
    Alexandria, VA
    Posts
    392

    Select combobox item by valuemember value

    I am using a combobox to store values contained in a collection class, like so:

    lstKeywords.ValueMember = "KeywordID"
    lstKeywords.DisplayMember = "KeywordString"
    lstKeywords.DataSource = colKeywords

    I would like to programmatically select a certain combobox member at runtime via the "KeywordID" value. What's the simplest approach to do this?

    Thanks...
    Bob Rouse
    Dimension Data

  2. #2
    Join Date
    Dec 2004
    Posts
    163
    Bob,

    You can set the combo box's SelectedValue property to some value and the item with that value will be selected.

    Or am I not understanding what you are trying to do?

    Kerry Moorman

Similar Threads

  1. Replies: 5
    Last Post: 08-18-2006, 01:15 PM
  2. Getting a GUI to run
    By Eric in forum Java
    Replies: 4
    Last Post: 04-14-2006, 09:09 AM
  3. Getting a GUI to function
    By Eric in forum Java
    Replies: 1
    Last Post: 11-27-2001, 06:53 AM
  4. Get 10 months forward with select statment
    By Nirit Touboul in forum Database
    Replies: 7
    Last Post: 02-25-2001, 11:34 AM
  5. Stored Procedure (Want looping in Cursor)
    By malikmehmood in forum Database
    Replies: 0
    Last Post: 11-20-2000, 05:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links