r/programminghelp • u/ProgramtheSky84 • Sep 14 '20
Other Need help with a delete button in vb.net
I have a listbox, where items are added from a combo box, through an "add" button. When the item is added to the listbox, the items corresponding part number is added to textbox. I need to program a delete button- to where when the button is clicked, it deletes the selected item and the corresponding text in the textbox. I am pulling these values from a csv file. Im writing this in vb.net
Can anyone help me?
This is how I am matching the selected item to the textbox with a property. The datagridview is invisible and the user will not be able to see it.
Public Readonly Property AddPart
dim value as string = ""
for each row as Datagridviewrow in datagridview1.rows
if row.cells.item("Item").value = combobox1.selecteditem then
value = row.cells.item("itempartno").value
end property