Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This question refers to the following article:

http://www.codeproject.com/Articles/19058/A-Neat-Solution-to-GridView-Custom-Paging

When a user is on the last page of the gridivew and a postback occurs, the gridivew generates a lot of blank rows (Not desirable behavior).

It the article you told others to rebind the gridview.
Is there an alternative to rebinding. Why does the gridview seemingly generate rows if the gridivew is not being rebound on postback. Is this a rendering issue that can be caught and planned for. Can we save something else in viewstate to stop to rendering of blank rows.

i.e. if datakeys > x then stop rendering rows or if rowBeingRendered > lastKnowRowCount the stop generating rows.

Any suggestion would be greatly appreciated. I'd prefer not to muddy the code up with check for last page. This gridview is used heavily in the application.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900