Hi guys. I need help in copying selected row from DataGrid to another. What I want is if I click a row it will be copied to another DataGrid. I set my DataGrid Selection Mode to FullRowSelect. Is it possible for me to update my database using the copied rows.
My code so far:
DtSet is the Dataset I used to get the values from my Database in DataGridView1
Dim MyConnection As New OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; Data Source='" & path & "'; Extended Properties=Excel 12.0;") MyConnection.Open() For Each SelectedRow As DataRow In DtSet.Tables(0).Rows Dim r As String = SelectedRow("ITEM CODE") Dim bc = SelectedRow("Inventory on Hand") 'I don't know what comes after this Next MyConnection.Close()
I don't have any ideas will I do it. Tried searching and I still don't get it.
Edited 3 Years Ago by jared.geli