Paging loads faster.

amir100

Centurion
Joined
Mar 14, 2004
Messages
190
Location
Indonesia
There's something I need to know in Web Application development. Perhaps this is a silly question. But I was wondering would a DataGrid with "Allow Paging" enabled loads faster than with "Allow Paging" disabled?
 
It would depend. If you have a dataset with 10,000 records that each have 10 fields the page would be very wide, and very tall and take along time to load (100,000 cells). If you enable paging, and set 100 records per page that'll only be 1,000 cells so it will load much faster.

AllowPaging does not make a page load faster or slower, unless you set the number of records (rows) per page and the number of total records.

HTH
 
The number of total records? I know how to set the number of rows (records) per page through the datagrid. But what do you mean by setting the number of total records?
 
If you have 100,000 records and you disable paging it will take a long time to render all the HTML, if you set the records per page to 100, you will decrease the render time x100, but the user will not be able to view all records at once. I generally put an option box (25, 50, 100, 200, all) at the bottom of the page that lets the user select how many records per page, so they can decide how long they want to wait for each page of results.
 
I generally put an option box (25, 50, 100, 200, all) at the bottom of the page that lets the user select how many records per page, so they can decide how long they want to wait for each page of results.

A good suggestion. I need to consider putting such an option in my page. :)
 
Back
Top