Sunday 21 April 2013

Cloning a row within data bound DataGridView


Me.HCDataSet.Tables("Hotels").ImportRow(HCDataSet.Tables("Hotels").Rows(Me.DGV_Hotels.CurrentRow.Index))
Me.HotelsBindingSource.MoveLast()
Dim o As DataRowView = (CType(Me.HotelsBindingSource.Current, DataRowView)) o.Row.SetAdded()


To commit the change:
Me.HotelsTableAdapter.Update(Me.HotelsBindingSource.DataSource)





Thanks Dinos for sharing!

1 comment: