How to add a new row in grid control

Hi Friends
I using syncfusion grid control. in this grid control statring contating 3 rows . in that i am deleting last row by using the below method
int index = this.gridcontrol1.CurrentCell.RowIndex;
this.gridcontrol1.Rows.RemoveRange(index, index);


then i am adding one more but it throwing an error like
Specified argument was out of the range of valid values.
Parameter name: rowIndex
please Help me.
Regards
venkat.



1 Reply

JS Jeba S Syncfusion Team January 14, 2008 12:03 AM UTC

Hi Venkataramu,

You can add new rows in the GridControl by increasing the row count. Below is the code snippet:


this.gridControl1.Model.Data.RowCount++;


Please refer the sample and letus know if this helps.
http://websamples.syncfusion.com/samples/Grid.Windows/F71039/main.htm

Kindly let us know if you need any further assistance.

Best Regards,
Jeba.




Loader.
Up arrow icon