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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Insert and Append row in GridGroupingControl

Thread ID:





74620 Jun 23,2008 10:08 AM UTC Jun 30,2008 01:00 PM UTC ASP.NET Web Forms (Classic) 3
Tags: GridGroupingControl
Kallyani Lanje
Asked On June 23, 2008 10:08 AM UTC

How can we insert and append the New Row in code behind page using GridGroupingControl.

Kindly provide samples if you have.

Thank you

Rajarajeswari S [Syncfusion]
Replied On June 23, 2008 07:35 PM UTC


Thanks for using Syncfusion products.

For inserting or appending a record to the Grid, we have to access the DataSource of the Grid as DataTable and we can add a new row in that, and again we can binded it to the Grid.

Please refer the below code snippet which illustartes this:

DataTable dt = this.GridGroupingControl1.DataSource as DataTable;
DataRow dr5 = dt.NewRow();
dr5[0] = "6";
dr5[1] = " rachel";
dr5[2] = "1";
this.GridGroupingControl1.DataSource = dt;

Please refer the sample from the below link which illustartes this:


Please let me know if you have any other concerns.


Kallyani Lanje
Replied On June 24, 2008 04:35 AM UTC

HI Raji,

Thank you for your response. I am able to add new row using Datatable. but my problem is

we have 2 buttons

1. Insert row button
first we select any of the row in the Grid. then we click the insert button. the empty row will be insert on any of the
grid row position.

2. Append Row button
should be add in the after last row of the grid.

Kindly give some examples.
Thank you,

Rajarajeswari S [Syncfusion]
Replied On June 30, 2008 01:00 PM UTC

Hi Kallyani,

Sorry for the delay in responding you,

You can insert a row in the Grid, if you binded it with ArrayList. Please refer the below code snippet for Inserting and Appending a row in the Grid:


ArrayList arr1 = this.GridGroupingControl1.DataSource as ArrayList;
arr1.Insert(3, new MyClass(007, "Nancy", "UK"));
this.GridGroupingControl1.DataSource = arr1;


ArrayList arr2 = this.GridGroupingControl1.DataSource as ArrayList;
arr2.Add(new MyClass(008, "Jeorge", "AUS"));
this.GridGroupingControl1.DataSource = arr2;

Please refer the sample from the below link which illustrates this:


Please let me know if this helps you out.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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