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?
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?
By srinivasc_it in forum .NET
Last Post: 08-18-2006, 01:15 PM
Last Post: 04-14-2006, 09:09 AM
Last Post: 11-27-2001, 06:53 AM
By Nirit Touboul in forum Database
Last Post: 02-25-2001, 11:34 AM
By malikmehmood in forum Database
Last Post: 11-20-2000, 05:12 AM
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