Gridview paging

M

mazdotnet

Hi everyone,

I know when you enable paging in a datagrid the entire data is read but
only the data that you want is displayed to the end user. Has this
changed for Gridview? So if you have 10000 records and you only want 20
records displayed, does it read all 10000 and display 20 or does it
only read what it needs (Read 20 and display 20)?

Thanks
MA
 
A

Alvin Bruney

It's the latter, paging is implemented with script call backs so that only
the data needed is retrieved.

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
J

Jan Hyde

"Alvin Bruney" <www.lulu.com/owc>'s wild thoughts were
released on Wed, 24 May 2006 21:15:32 -0400 bearing the
following fruit:
It's the latter, paging is implemented with script call backs so that only
the data needed is retrieved.

Are you certain. The Help says this

'If the DetailsView control is bound to a data source
control or to any data structure that implements the
ICollection interface (including datasets), the control gets
all the records from the data source, displays the record
for the current page, and discards the rest. When the user
moves to another page, the DetailsView control repeats the
process, displaying a different record.'





Jan Hyde (VB MVP)
 
A

Alvin Bruney

Are you certain. The Help says this
The help is referring to gridview objects that are bound directly to a
datasource that does not explicitly support paging. Also, the help docs are
correct if the gridview is bound in code via the datasource property.

However, for the reverse, that is, a gridview object that is bound in code
via the datasourceid property or in the instance where the gridview is bound
to a datasource that supports the paging capabilities, the gridview will
retrieve only the the number of records that are required to fill the page.

I was wrong when I said the gridview implemented scripting callbacks, it
doesn't.
--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top