ComboBox DisplayMember

lothos12345

Junior Contributor
Joined
May 2, 2002
Messages
294
Location
Texas
I am trying to delete one item in a combobox. Its being loaded through its display member. Below is a copy of the code:

ComboBox4.DataSource = Sqlds.Tables("dsmain")
ComboBox4.DisplayMember = Sqlds.Tables("dsmain").Columns("Listname").ToString
ComboBox4.ValueMember = Sqlds.Tables("dsmain").Columns("PtProgListId").ToString


I want to delete the first item in the combo box, but no matter what I try it will not work. I have tried deleting it by using the item remove at the '0' index but it is not working. Any help would greatly be appreciated.
 
Have you tried removing the item from the dataset? I dont think you can remove an item from a combo box using the item collection when an underlying datasource will still contain the item, if you know what i mean :)
 
Back
Top