Hey guys,
I'm trying to find a way to delete a selected row from a DataGridView control. I've added two columns using the designer, one that should delete the row, and another one should allow me to edit the row. Then I'm getting the data from my model (using LINQ and Entity Framework) and binding the result as the data source (ProductsDGV.DataSource = QueryResult)
Anyway, now I need to place some code which does the trick inside the click handler of that delete button. I tried doing some stuff similar to what I usually do with ComboBoxes (using the SelectedIndex property) but that didn't work and I got stuck eventually... So could someone help me with some code to get started please?
I'm trying to find a way to delete a selected row from a DataGridView control. I've added two columns using the designer, one that should delete the row, and another one should allow me to edit the row. Then I'm getting the data from my model (using LINQ and Entity Framework) and binding the result as the data source (ProductsDGV.DataSource = QueryResult)
Anyway, now I need to place some code which does the trick inside the click handler of that delete button. I tried doing some stuff similar to what I usually do with ComboBoxes (using the SelectedIndex property) but that didn't work and I got stuck eventually... So could someone help me with some code to get started please?