468,103 Members | 1,273 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,103 developers. It's quick & easy.

Gridview paging

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

May 24 '06 #1
3 2662
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
-------------------------------------------------------

"mazdotnet" <ma*******@gmail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
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

May 25 '06 #2
"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)

--
Universe: A one stanza poem (Stan Kegel)

May 25 '06 #3
> 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
-------------------------------------------------------

"Jan Hyde" <St***********@REMOVE.ME.uboot.com> wrote in message
news:ms********************************@4ax.com...
"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)

--
Universe: A one stanza poem (Stan Kegel)

May 25 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by davidjgonzalez | last post: by
8 posts views Thread by Greg Lyles | last post: by
2 posts views Thread by antonyliu2002 | last post: by
5 posts views Thread by Andrew Robinson | last post: by
reply views Thread by Don Miller | last post: by
4 posts views Thread by Don Miller | last post: by
4 posts views Thread by Peter | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.