Home Forums WinForms controls Xceed Grid for WinForms how can i delete a record from the grid Reply To: how can i delete a record from the grid

User (Old forums)
Member
Post count: 23064

Simply insert some code to delete a row in the Click event of your button, and the DataSet (not the Database though) will automatically be updated by the grid. You can delete a row with code like this :

Dim row As Xceed.Grid.DataRow = CType(GridControl1.CurrentRow, Xceed.Grid.DataRow)
GridControl1.DataRows.Remove(row)
‘or
GridControl1.DataRows.RemoveAt(row.Index)

Imported from legacy forums. Posted by André (had 4317 views)