paulthepaddy
Well-known member
hi all, i have a binding list which i want to be able to add and remove items.
This is the class im using
then i call it
then i bind it to a combobox
but how do i remove it? i tried both of these which work but dont do exactly what i need il explain below
the delete code gets called froma sub
this worked but after i delete 1 or 2 the list is no longer is order so when deleting car 4
i could really be deleting car 3 as the list would be altered.
I Tried
but since their is 3 diffrent lists that need to have items deleted at once, this is a pain for the user to make sure all 3 combobox's are on the correct item.
this is the tool tip i get

i just don't understand how the items in the binding list are named so i can't name the item to remove.
i listed so much code i dont know if i have to name them when adding the item, any advice i am grateful for.
This is the class im using
VB.NET:
Friend Class ExecutableItem
Public Property Text() As String
Public Property Method() As Action
Public Damage() As String
End Class
VB.NET:
Dim Car_Current As New BindingList(Of ExecutableItem)
then i bind it to a combobox
VB.NET:
Car_Select.Add(New ExecutableItem With {.Text = "Car 1", .Method = AddressOf View_car1})
but how do i remove it? i tried both of these which work but dont do exactly what i need il explain below
the delete code gets called froma sub
VB.NET:
Car_Select.RemoveAt(0)
VB.NET:
Car_Select.RemoveAt(3)
I Tried
VB.NET:
Car_Select.Remove(me.ComboBox_Car_Viewer.SelectedItem)
this is the tool tip i get

i just don't understand how the items in the binding list are named so i can't name the item to remove.
i listed so much code i dont know if i have to name them when adding the item, any advice i am grateful for.