473,325 Members | 2,712 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,325 software developers and data experts.

DataGrid Pagination

I am trying to get pagination working on a datagrid. Can anyone point me to
a resource for help on this? I'm not sure if custom paging is the best
option or not.
Nov 17 '05 #1
3 8663
hi,
I posted a similar post below.
datagrid does paging for you, u just set AllowPaging=true for datagrid.
it's said that custom paging is not paging at all, no page index appeared
at the bottom if you use custom paging.

what kind of datasource u r using for datagrid control,it seems that
matters
too.

Yangtsi.

"Joseph D. DeJohn" <jo********@hotmail.com> дÈëÏûÏ¢ÐÂÎÅ
:Oz**************@TK2MSFTNGP12.phx.gbl...
I am trying to get pagination working on a datagrid. Can anyone point me to a resource for help on this? I'm not sure if custom paging is the best
option or not.

Nov 17 '05 #2
I saw your post, but the default pagination is having problems working. I
opted for the only other alternative. You can guess. I am using a SQL
datasource. Can't believe you are having problems with custom paging also.
Dunno what to think at this point.

"Yangtsi River" <na***@sina.com> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
hi,
I posted a similar post below.
datagrid does paging for you, u just set AllowPaging=true for datagrid.
it's said that custom paging is not paging at all, no page index appeared
at the bottom if you use custom paging.

what kind of datasource u r using for datagrid control,it seems that
matters
too.

Yangtsi.

"Joseph D. DeJohn" <jo********@hotmail.com> дÈëÏûÏ¢ÐÂÎÅ
:Oz**************@TK2MSFTNGP12.phx.gbl...
I am trying to get pagination working on a datagrid. Can anyone point
me to
a resource for help on this? I'm not sure if custom paging is the best
option or not.


Nov 17 '05 #3
allowpaging passes control to the datagrid to take care of most of it, all
it means is the control divides up the page according to your page count,
you still have to instantiate a post back procedure that handles switching
to the different pages...

custom pages does work, but it doesn't split the pages up for you, you've
more control, and hence have to do more work with the control to get the
results you want... (you may want all the records in may 2000 in one page,
for example, and there may be more in june, so a straight count that the
allowpaging uses wouldn't work...)

the postback method is easy enough.

Sub MyDBgrid_Paging(sender As Object, e As DataGridPageChangedEventArgs)
MyDBgrid.CurrentPageIndex = e.NewPageIndex
BindData()
End Sub
this simply gets the number that was clicked on from 'e', then tell the grid
what page it's on before binding the data.

good luck
"Joseph D. DeJohn" <jo********@hotmail.com> wrote in message
news:e5**************@TK2MSFTNGP12.phx.gbl...
I saw your post, but the default pagination is having problems working. I
opted for the only other alternative. You can guess. I am using a SQL
datasource. Can't believe you are having problems with custom paging also. Dunno what to think at this point.

"Yangtsi River" <na***@sina.com> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
hi,
I posted a similar post below.
datagrid does paging for you, u just set AllowPaging=true for datagrid.
it's said that custom paging is not paging at all, no page index appeared at the bottom if you use custom paging.

what kind of datasource u r using for datagrid control,it seems that
matters
too.

Yangtsi.

"Joseph D. DeJohn" <jo********@hotmail.com> дÈëÏûÏ¢ÐÂÎÅ
:Oz**************@TK2MSFTNGP12.phx.gbl...
I am trying to get pagination working on a datagrid. Can anyone point

me
to
a resource for help on this? I'm not sure if custom paging is the best option or not.



Nov 17 '05 #4

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

Similar topics

2
by: Mukesh Kumar | last post by:
Hi, Can anybody throw some light about displaying records in datagrid and pagination will be done alphabetically. Like I want to click on G and want to display all the records starts with G. Is...
1
by: David Petersen | last post by:
I need to change the paging buttons in my C# web datagrid from "previous" and "next" to something like "Records 10-20 of 100", etc., depending on which page the user is on. Any ideas? Thanks,...
0
by: Child | last post by:
I have a datagrid on which i would like a button column and pagination in the asp:datagrid tag i have the following code: onpageindexchanged="page_change" onitemcommand="gridact_itemcommand" ...
2
by: RB | last post by:
Hi All, The ASP.NET Datagrid's pagination capability allows me to display either the Next/Prev buttons or the Page numbers to allow the user to navigate through the datagrid page by page as...
1
by: Khan.A.Mushtaq | last post by:
hi can any one help me how to make working page number, edit and delete when we use datagrid on a web application in vb.net 2003. I have made connection with my access data base and the lay out...
0
by: harish.c27 | last post by:
Hi folks!!! Can we implement pagination for DataGrid control in a Windows Forms (.net1.0- 2003) Application? Any code help will be useful. Thanks in advance. Harish
1
by: OceanBreeze | last post by:
I am new to .Net. I am using ASP 2.0 and C#. I want to pupolate a data grid programatically using the values obtained from a list conating domain objects. E.g., DAL.GetEmployee() returns a...
2
by: =?Utf-8?B?SnVsaWEgQg==?= | last post by:
Hi all Got a weird problem with pagination on a datagrid in asp.net 1.1. It's populated depending on user selected criteria (it either displays all or 1 record). It works fine in the...
16
by: gnawz | last post by:
I have a pagination function I am using in a file called functions.php as below<? //Pagination functions function getPagingQuery($sql, $itemPerPage = 10) { if (isset($_GET) && (int)$_GET > 0) ...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.