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

Changing RowCount of Grid at runtime

Thread ID:





62837 Jun 22,2007 06:54 PM UTC Jun 25,2007 09:05 AM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Asked On June 22, 2007 06:54 PM UTC


I am trying to increment / decrement the rows in a grid control at run time.

I do a something like the one belwo

this.categoryGrid.RowCount += 1;
this.categoryGrid.RowCount -= 1;

The next time I call categoryGrid.refresh() the count goes back to the original value and my rows in the view also get lost ....How can i change the rowCount at run time and retain them . Someone please throw light on this.


Administrator [Syncfusion]
Replied On June 25, 2007 09:05 AM UTC

Hi Shashank,

You can increase or decrease the rowcount using this code snippet:

grid.RowCount = grid.RowCount +1;//Increase
grid.RowCount = grid.RowCount -1;//Decrease

Here is a small sample:

The other comment is that it is much quicker to add all the rows or columns at one time, than it is to add then row or cols one at the time. So, if you want to add 500 rows, use code like
grid.RowCount = grid.RowCount + 500 instead of grid.RowCount += 1 five hundred times.

Kindly let us know if you need any further assistance.

Best Regards,


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

This page will automatically be redirected to the 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