473,770 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2873
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*******@gmai l.com> wrote in message
news:11******** *************@u 72g2000cwu.goog legroups.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.c om...
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2736
by: ck388 | last post by:
For some reason when I enable the callback feature of the gridview I still get a page refresh, that is it seems like there is a postback that occurs, not a callback which is just supposed to update not the whole page, but a portion of the page. Strangely enough the URL below http://beta.asp.net/QUICKSTARTV20/aspnet/doc/ctrlref/data/gridview.aspx (VB GridView Paging and Sorting Callbacks example)
2
16345
by: | last post by:
Hello, I have a GridView in my ASP.NET 2.0 application that performs the paging feature perfect when I have it bound to a data source. But now I have it bound to a dataset and the paging feature will not work. When I try to use paging I get this error: The GridView 'gvResults' fired event PageIndexChanging which wasn't handled.
1
2946
by: davidjgonzalez | last post by:
I have a GridView that has paging enabled. Each item (as defined in an ItemTemplate) includes several controls which have operations i would like to Atlas-enable. Everything is working well except when I page the GridView (the paging controllers are in the gridview's footer). The webpage doesnt scroll back to the top of the page, so when paging through the GridView the user is always looking at the last 4-5 items on the page. My current...
8
18089
by: Greg Lyles | last post by:
Hi all, I'm trying to develop an ASP.NET 2.0 website and am running into some real problems with what I thought would be a relatively simple thing to do. In a nutshell, I'm stuck on trying to display data in a "GridView" which is tied to an "ObjectDataSource". In turn, this ObjectDatasource gets it's data from a strongly-typed business object within my code.
2
13200
by: antonyliu2002 | last post by:
I've been googling for some time, and could not find the solution to this problem. I am testing the paging feature of gridview. I have a very simple web form on which the user can select a few fields to be included in the table, which is to be bound to the gridview. The web form looks like so (Don't worry about the stupidity of this web form for now.):
5
3007
by: Andrew Robinson | last post by:
I am attempting to better automate a Pager Template within a GridView. I am succesfully skinning a Drop Down List withing my control (the DDL is added to my control). I correctly populate the item list that corresponds with the number of pages, but I am unable to wire up the Selected Index Changed event. Auto PostBack is set to true and the page is posting back when the DDL is selected / chaged, but the event is never being called. Any...
0
2007
by: Don Miller | last post by:
Here is an example of what I believe is a bug in ASP.NET 2.0 GridView paging without postbacks (or at least not documented how to fix it). Once the GridView is displayed, clicking on any of the paging tools causes the GridView to completely disappear! This happens when either DataSets or DataTables are used (it doesn't work at all for DataReaders because they don't support paging apparently). If you remove the...
3
3743
by: Ronald S. Cook | last post by:
I was told that if calling lots of records from the database (let's say 100,000), that the GridView's paging feature would automatically "handle" everything. But the 100,000 records are still coming to the client, right? I mean, the paging feature isn't somehow making calls to the database for 25 records at a time or anything like that is it? I remember in the past having to write nasty stored procedures that took in
4
2728
by: Don Miller | last post by:
This is a repost of a reproducible problem/bug with GridView with dynamic SQL and binding. Is there a better ASP.NET newsgroup I should post to where MS techs or MVPs take an interest in such problems? Thanks. Here is an example of what I believe is a bug in ASP.NET 2.0 GridView paging without postbacks (or at least not documented how to fix it). Once the GridView is displayed, clicking on any of the paging tools causes the
4
8842
by: Peter | last post by:
I want to call a JavaScript on PageIndexChanged event, how do I do that? Thank You Peter
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10257
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.