We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add a new row in the Grid?

Platform: WinForms |
Control: GridDataBoundGrid(Classic)
Tags: addnewrow

To add rows or columns to the GridDataBoundGrid control, you have to add columns or rows to the DataSource, that is mapped to the GDBC control. Use the AcceptChanges() property to accept all changes in the DataSource when the rows or columns added.

The following code example demonstrates the same.


void GridDataBoundGrid1_CellClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e)
 if (e.MouseEventArgs.Button == MouseButtons.Right)
  DataRow tableRow = table.NewRow();
  table.Rows.InsertAt(tableRow, e.RowIndex); //Adds the row.
  // table.Columns.Add(); //Adds the column.



Private Sub GridDataBoundGrid1_CellClick(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs)
 If e.MouseEventArgs.Button = MouseButtons.Right Then
  Dim tableRow As DataRow = table.NewRow()
  table.Rows.InsertAt(tableRow, e.RowIndex) 'Adds the row.
  'table.Columns.Add(); //Adds the column.
 End If
End Sub



The same procedure can be used for the Gridcontrol and GridGroupingcontrol.


2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment
Bittu Dwivedi
Sep 25, 2019

How to do this for SfDataGrid control. I am facing problem on adding new rows through C# code ?

Susmitha Sundar [Syncfusion]
Sep 30, 2019

Hi Bittu,

We have prepared the sample to add the new row in SfDataGrid. Please refer the below link,


Regards, Susmitha S

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile