I am trying to program a delete button on my form. I have a listbox, combobox and textbox on the form. When the user selects from the combo box that is populated from a csv, the selection is added to a listbox, at the same time the corresponding "part number" is put into the textbox. I am trying to figure out how when i select from the listbox and delete, I can delete the matching part number from the textbox. I'm using a datagridview, as well, but it is hidden on the form. Here is the property I'm using to populate the textbox.
public readonly property addValue
dim returnValue as string = ""
for each row as Datagridviewrow in Datagridview1.rows
if row.cells.item("Description").Value = cmbHardware.SelectedItem then
returnvalue = row.cells.item("Part#").Value
end property
I could be going about this all wrong, but I haven't been able to figure to delete from the textbox and listbox at the same time. Any help or advice would be appreciated. Thank you
public readonly property addValue
dim returnValue as string = ""
for each row as Datagridviewrow in Datagridview1.rows
if row.cells.item("Description").Value = cmbHardware.SelectedItem then
returnvalue = row.cells.item("Part#").Value
end property
I could be going about this all wrong, but I haven't been able to figure to delete from the textbox and listbox at the same time. Any help or advice would be appreciated. Thank you