Hi, i am doing with deleting row permenately from database currently,but the problem i face right is that i can delete row from datagridview only, but the data inside database remains unchange.I want to delete a row which i selected permenately when i click a delete button .
Here is the code that i written...
Private Sub Delete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Delete.Click
conn_1.Open()
Dim sqladapter_1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter("select * from Table_1", conn_1)
sqladapter_1.Fill(sa, "Table_1")
Dim cmb1 As New SqlClient.SqlCommandBuilder(sqladapter_1)
For Each row As DataGridViewRow In DataGridView1.SelectedRows
DataGridView1.Rows.Remove(row)
Next
DataGridView1.EndEdit()
sqladapter_1.Update(sa, "Table_1")
conn_1.Close()
End Sub
what's the code i should added to get what i desired?