I have a windows forms application that has a DatagridView control that I am populating from an SQL Database. I am using the following code to populate the DataGridView:
Dim sSQL As String = "SELECT * FROM tblStatus WHERE REC_ID = '100'"
Dim cn As New SqlConnection(....Connection String Info)
daGrid_Data = New SqlDataAdapter(sSQL, cn)
dsGrid_Data = New Data.DataSet
datGridView.DataSource = dsGrid_Data
datGridView.DataMember = "search_result"
This works fine populating the grid. I have the following code in the click event of a button on the form.
When the user deletes a row from the grid the delete row is not removed from the dataset and therefore not removed from the database. I do i update the database to be the same as what is in the datagridview?