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, 02:15 PM
Last Post: 04-14-2006, 10:09 AM
Last Post: 11-27-2001, 07:53 AM
By Nirit Touboul in forum Database
Last Post: 02-25-2001, 12:34 PM
By malikmehmood in forum Database
Last Post: 11-20-2000, 06:12 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center