If you want to delete a row in a data grid first add a delete button from property builder and in that select columns options in that you will find delete button just add that first and then you have code your delete query in the codebehind.bett er try to add buttons from html code rather than design view
Dim Connection As New OleDb.OleDbConn ection
Dim dbProvider As String = "Provider=Micro soft.ACE.OLEDB. 12.0;Jet OLEDB:Database Password=cSSO3s EEhrM4vY3je0qC; " 'connect to the access 2010 database, including DB Password
Dim dbSource As String = "Data Source = C:\sys(Q)\db's\ TGBTG1.accdb"
Connection.Conn ectionString = dbProvider & dbSource
Connection.Open ()
Dim dt As New DataTable
Dim ds As New DataSet
ds.Tables.Add(d t)
Dim da As New OleDbDataAdapte r
da = New OleDbDataAdapte r("select * from buy where Qu_id=" & Quotation_IDLab el1.Text, Connection)
da.Fill(dt)
Dim i As Integer
i = DataGridView1.C urrentRow.Index
dt.Rows(i).Begi nEdit()
dt.Rows(i).Dele te()
dt.Rows(i).EndE dit()
Comment