Hi, I have DataGridView control (with binding data).When user add new row and fill it, their is button that allows to save data from row to database. I do not want my program to work in that way. I want new record to be saved after user fill current row.
thanks
Loading

Suthish NairRank #92 · 22.8K reputationPosted Dec 13, 2010, 8:36 AM EST
Dozd59 reputationPosted Dec 13, 2010, 2:55 PM EST
CrishRank #1,487 · 1.1K reputationPosted Dec 14, 2010, 12:56 AM EST
you can refer following code i think it will help you.
Private Sub bt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click 'Load DataGridView mAdapter.SelectCommand = _ New OleDb.OleDbCommand(SQL1, New OleDb.OleDbConnection(connectionString)) 'Auto-Generate INSERT, UPDATE and DELETE sql commands Dim cb As New OleDb.OleDbCommandBuilder(mAdapter) mAdapter.AcceptChangesDuringFill = False 'Fill table Dim table As New DataTable() mAdapter.Fill(table) 'Set as DataSource for grid Me.dgResults.DataSource = table Me.dgResults.AutoResizeColumns( _ DataGridViewAutoSizeColumnsMode.AllCells) End Sub