473,805 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid paging using SQL - pulling back <n> records at a time with exact counts

Hello All,

I am developing a web front end using the standard datagrid in the 1.1
framework. Currently it allows users to navigate through records 20 at
a time via previous and next buttons. This functionality is working
nicely and efficiently. I like this because I dont have to grab ALL the
records on each trip, just the next or previous 20. I am having a
terrible time creating the exact counts for the data grid navigation.
I use a method to get a count of the total records on the first initial
search. However creating the logic for building the exact count logic
while navigating forwards and backwards is tough. I would like to be
able to say "showing records 1-20 then 20-40 and then 40-43" (Assuming
the full search results in 43 records returned). Does anyone have (or
know of) a solid example of this. I know a lot of sites used this type
of functionality but I am not sure of the best approach. Any help
would
be greatly appreciated.

Sep 28 '06 #1
3 1689
q
I know it doesn't help... but this is all built into ASP.NET 2.0.

db******@progre ssive.com wrote:
Hello All,

I am developing a web front end using the standard datagrid in the 1.1
framework. Currently it allows users to navigate through records 20 at
a time via previous and next buttons. This functionality is working
nicely and efficiently. I like this because I dont have to grab ALL the
records on each trip, just the next or previous 20. I am having a
terrible time creating the exact counts for the data grid navigation.
I use a method to get a count of the total records on the first initial
search. However creating the logic for building the exact count logic
while navigating forwards and backwards is tough. I would like to be
able to say "showing records 1-20 then 20-40 and then 40-43" (Assuming
the full search results in 43 records returned). Does anyone have (or
know of) a solid example of this. I know a lot of sites used this type
of functionality but I am not sure of the best approach. Any help
would
be greatly appreciated.
Sep 28 '06 #2
That is good news. Can you point me further? I am more than willing
to explore the 2.0 framework if this functionality is available. Is
this something available in a newer version of the datagrid?? Thanks
for the responce.

q wrote:
I know it doesn't help... but this is all built into ASP.NET 2.0.

db******@progre ssive.com wrote:
Hello All,

I am developing a web front end using the standard datagrid in the 1.1
framework. Currently it allows users to navigate through records 20 at
a time via previous and next buttons. This functionality is working
nicely and efficiently. I like this because I dont have to grab ALL the
records on each trip, just the next or previous 20. I am having a
terrible time creating the exact counts for the data grid navigation.
I use a method to get a count of the total records on the first initial
search. However creating the logic for building the exact count logic
while navigating forwards and backwards is tough. I would like to be
able to say "showing records 1-20 then 20-40 and then 40-43" (Assuming
the full search results in 43 records returned). Does anyone have (or
know of) a solid example of this. I know a lot of sites used this type
of functionality but I am not sure of the best approach. Any help
would
be greatly appreciated.
Sep 29 '06 #3
Just following up on my own post I found some things on Microsoft that
outlines usage of the gridview. The ASP.NET GridView control is the
successor to the v1.x DataGrid.

http://quickstarts.asp.net/QuickStar.../gridview.aspx

dbark...@progre ssive.com wrote:
That is good news. Can you point me further? I am more than willing
to explore the 2.0 framework if this functionality is available. Is
this something available in a newer version of the datagrid?? Thanks
for the responce.

q wrote:
I know it doesn't help... but this is all built into ASP.NET 2.0.

db******@progre ssive.com wrote:
Hello All,
>
I am developing a web front end using the standard datagrid in the 1.1
framework. Currently it allows users to navigate through records 20 at
a time via previous and next buttons. This functionality is working
nicely and efficiently. I like this because I dont have to grab ALL the
records on each trip, just the next or previous 20. I am having a
terrible time creating the exact counts for the data grid navigation.
I use a method to get a count of the total records on the first initial
search. However creating the logic for building the exact count logic
while navigating forwards and backwards is tough. I would like to be
able to say "showing records 1-20 then 20-40 and then 40-43" (Assuming
the full search results in 43 records returned). Does anyone have (or
know of) a solid example of this. I know a lot of sites used this type
of functionality but I am not sure of the best approach. Any help
would
be greatly appreciated.
Sep 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5087
by: trusst_3 | last post by:
Hello, This is the only line in my entire code that does not validate in XHTML : <td width="24" bgcolor="#330066" onclick="javascript:color1()" class="borderWidthr"></td> However, it is valid HTML,since I've defined the function color in the javascript section of the <head> tag.
0
303
by: Dnf | last post by:
Hallo It is possible to force property of the control whith is of Hashtable (Dictionary<T>) type to serialize its content in Design-Time ?? -- Dominik Jeske
8
5055
by: Christian Stigen Larsen | last post by:
Consider the following: class parent { public: virtual void print() { printf("Parent\n"); } }; class child : public parent {
13
3299
by: Jalal | last post by:
I am trying to use numeric_limits<double>::min() in an MFC application in Microsoft Visual C++.NET 2003. I am having some difficulties here. The following are the parts of a simple program I wrote and corresponding error massages. I am confused here. Similar codes work fine in Win32 Console Project. Can you please help me to resolve this? Thank you for your helps. Best Regards, Jalal
2
3207
by: Mike | last post by:
This works fine in Netscape 7.1, but not at all in IE. I'm using it to pop up a tool tip. Any workarounds for Internet Explorer? Thanks, Mike
1
2281
by: sklett | last post by:
Hi- I am using an <img> tag in a DataList. Here is the code: <img src='~/Images/<%# DataBinder.Eval(Container.DataItem, "Img")%>' runat="server"> This results in: " />
0
224
by: Lynn | last post by:
Hello, I have a datagrid setup, and I have the records in the datagrid displayed by a date range. I would like to use some custom paging, but am unsure of how to get this to work when the items are sorted by date. Her is my SQL statement that is sued to populate my datagrid: >>
0
2442
by: adebaene | last post by:
Hello all, Has everyone tried to use the functions taking a Predicate in Generics container in C++/CLI? Say I have a List<MyClass^>^ my_array, and I want to call RemoveAll on it. How would you do this? The most natural approach would be :
3
6414
by: Chris Jones | last post by:
Hi, I've experimenting with using boost::pool_allocator with std::vector and gcc (4.1)., and I am having problems with segmentation violations. Below I give a simple example of one way I am getting this // Include files #include <cmath> #include <iostream> #include <vector>
0
9596
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
10607
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...
1
10364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7645
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
6875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4317
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
3843
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.