views:

343

answers:

2

I have the following questions regarding pagination in a gridview.. First as a beginner i used default pagination for all my gridviews..

After checking out some articles on performance they all focus on custom pagination...

  • Is it a bad practice to use default pagination of a gridview?

  • When to use custom pagination over default pagination in a gridview?

+3  A: 

No matter what method you use, the pagination should be done by the SQL server. First attach a profiler to SQL server. Then navigate using the pagination. Observe the queries. If the number of records returned is greater than what is shown on the screen you are doing it the wrong way.

The custom pagination allows you to tweak SQL queries to fetch only records needed to be shown by the GridView.

Darin Dimitrov
@Darin what if i use numeric paging mode of a gridview under default pagination.. I have to generate page numbers...
Pandiya Chendur
A: 

Check this link Click Here

Dilse Naaz