How to insert row at particular row index?

Hi,
I am using grid grouping control ,
I want to insert new row at particular row index.
Is any solution regarding this?

Regards ,
Paurnima.

1 Reply

MS Maniratheenam Sehar Syncfusion Team November 11, 2014 04:51 AM UTC

Hi Paurnima

 

Thanks for using Syncfusion product.

 

 

 

Query:

How to insert row at particular row index?

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";

dt.Rows.Add(dr5);

this.GridGroupingControl1.DataSource = dt;

 

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

 

http://websamples.syncfusion.com/samples/Grid.Web/6.2.0.40/Grid_Web_AddNewRow/main.htm

 

 

 

 

Please let me know if you have any other concerns.

 

Regards,

ManiRatheenam S


Loader.
Up arrow icon