473,320 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Need advice on paging data from data source.

I am displaying data from a SQL Server database on my ASP.NET web form. The
data table that I am displaying is huge and it must be paged. What I would
like to do is display 10 records at a time and allow the user to jump to a
particular page if they desire. I would like my interface to display the
total number of pages and offer the user the ability to select which page
they would like to display. I have not figured out how I can do this. All
articles that I have read assume that you are just paging forward or paging
backward by one page rather than skipping around. Does anyone have any
information on methods that can be used to do what I am describing?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
Nov 19 '05 #1
4 1507
The DataGrid is probably what you're after, it provides the ability to page
data and provide the pager controls.
After you have databound the control, you can use the PageCount property to
find the total number of pages and get/set the CurrentPageIndex property
(remember to re DataBind() after setting) to change the current page.

--
Philip Q
Microsoft MVP [ASP.NET]

"Ken Varn" <nospam> wrote in message
news:eL****************@tk2msftngp13.phx.gbl...
I am displaying data from a SQL Server database on my ASP.NET web form.
The
data table that I am displaying is huge and it must be paged. What I
would
like to do is display 10 records at a time and allow the user to jump to a
particular page if they desire. I would like my interface to display the
total number of pages and offer the user the ability to select which page
they would like to display. I have not figured out how I can do this.
All
articles that I have read assume that you are just paging forward or
paging
backward by one page rather than skipping around. Does anyone have any
information on methods that can be used to do what I am describing?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

Nov 19 '05 #2
It's my understanding that the entire dataset needs to be loaded in order to
accomplish this. Is this true? If so, it is not very practical in my case
because the dataset may be too huge to load into memory in its entirety.

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
"Philip Q [MVP]" <wi******@NOSPAMmvps.org> wrote in message
news:%2********************@TK2MSFTNGP10.phx.gbl.. .
The DataGrid is probably what you're after, it provides the ability to page data and provide the pager controls.
After you have databound the control, you can use the PageCount property to find the total number of pages and get/set the CurrentPageIndex property
(remember to re DataBind() after setting) to change the current page.

--
Philip Q
Microsoft MVP [ASP.NET]

"Ken Varn" <nospam> wrote in message
news:eL****************@tk2msftngp13.phx.gbl...
I am displaying data from a SQL Server database on my ASP.NET web form.
The
data table that I am displaying is huge and it must be paged. What I
would
like to do is display 10 records at a time and allow the user to jump to a particular page if they desire. I would like my interface to display the total number of pages and offer the user the ability to select which page they would like to display. I have not figured out how I can do this.
All
articles that I have read assume that you are just paging forward or
paging
backward by one page rather than skipping around. Does anyone have any
information on methods that can be used to do what I am describing?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------


Nov 19 '05 #3
I don't know a simple way.
There is good reason that those example on the web don't allow you to jump
around. It is because you can't know where to jump in generic example unless
you load the whole data.
If you have huge data to load and you MUST provide jumping around try to
cash keys only and based on the keys retrieve records from the database.
This is all will be fine if sorting is not an issue. If sorting is a issue
then you will need to load the fields that you sort by also and then it will
get even more complicated.
Have fun.
Shimon,
www.siatadev.com
"Ken Varn" <nospam> wrote in message
news:eL****************@tk2msftngp13.phx.gbl...
I am displaying data from a SQL Server database on my ASP.NET web form.
The
data table that I am displaying is huge and it must be paged. What I
would
like to do is display 10 records at a time and allow the user to jump to a
particular page if they desire. I would like my interface to display the
total number of pages and offer the user the ability to select which page
they would like to display. I have not figured out how I can do this.
All
articles that I have read assume that you are just paging forward or
paging
backward by one page rather than skipping around. Does anyone have any
information on methods that can be used to do what I am describing?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

Nov 19 '05 #4
Please check these links.

http://www.codeproject.com/aspnet/PagingLarge.asp

http://msdn.microsoft.com/msdnmag/is...e/default.aspx
"Ken Varn" <nospam> wrote in message
news:Ou****************@TK2MSFTNGP10.phx.gbl...
It's my understanding that the entire dataset needs to be loaded in order
to
accomplish this. Is this true? If so, it is not very practical in my
case
because the dataset may be too huge to load into memory in its entirety.

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
"Philip Q [MVP]" <wi******@NOSPAMmvps.org> wrote in message
news:%2********************@TK2MSFTNGP10.phx.gbl.. .
The DataGrid is probably what you're after, it provides the ability to

page
data and provide the pager controls.
After you have databound the control, you can use the PageCount property

to
find the total number of pages and get/set the CurrentPageIndex property
(remember to re DataBind() after setting) to change the current page.

--
Philip Q
Microsoft MVP [ASP.NET]

"Ken Varn" <nospam> wrote in message
news:eL****************@tk2msftngp13.phx.gbl...
>I am displaying data from a SQL Server database on my ASP.NET web form.
>The
> data table that I am displaying is huge and it must be paged. What I
> would
> like to do is display 10 records at a time and allow the user to jump
> to a > particular page if they desire. I would like my interface to display the > total number of pages and offer the user the ability to select which page > they would like to display. I have not figured out how I can do this.
> All
> articles that I have read assume that you are just paging forward or
> paging
> backward by one page rather than skipping around. Does anyone have any
> information on methods that can be used to do what I am describing?
>
>
> --
> -----------------------------------
> Ken Varn
> Senior Software Engineer
> Diebold Inc.
>
> EmailID = varnk
> Domain = Diebold.com
> -----------------------------------
>
>



Nov 19 '05 #5

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

Similar topics

1
by: B Golash | last post by:
Hi I`m trying to install a third-party control. During the install I receive this error...see the url below. I have no idea as to the meaning of the error. ...
2
by: enak | last post by:
I can not get my datagrid to page. I have a datagrid that I can sort 2 of the columns. This works great. I added paging and when I display the dg it shows 5 pages. (I am showing page numbers at...
2
by: Daniel Walzenbach | last post by:
Hi, I have a question regarding the DataGrid control. If paging is enabled the grid binds the data, sets the paging on the top/bottom (or however it is set up) and throws away unnecessary...
6
by: Shawn | last post by:
Hi. I already have a datagrid where I'm using paging. I have a stored procedure that fills a temp table with 200-500 rows and then sends back 10 records at the time. When I go to page 2 the SP...
2
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...
3
by: mazdotnet | last post by:
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...
0
by: Mrozik | last post by:
Hi! I'm looking for a solution to show data in a table. I think about DataView control - but I see one problem. My data source is a WebService returning paged pieces of data (I can't change...
5
by: Donald Adams | last post by:
Hi, I will have both web and win clients and would like to page my data. I could not find out how the datagrid control does it's paging though I did find some sample code that says they do it...
2
by: jaredciagar | last post by:
Hi Guys, Please Help ME.... I have a problem in displaying data in my gridview with paging, the data from the database is displaying to my gridview but I want to allow paging in my gridview.how can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.