473,811 Members | 3,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pager restting itself in gridview

Bob Ross
119 New Member
In my application in several of the gridviews if I click links within in the grids 5 times or more (links are opening new windows) then it treats the next pager click as a fresh laod of the page and returns you to page 1. It is not hitting the pageIndexChange d event just the page_load.

The strange thing is my gridviews are working in very different ways and still doing it. Some are simply bound in the code behind to a collection with a function for handling paging. Some are using an objectDataSourc e which fetches a dataview from a function. Some of the links are using javascript to open a new window. Some are standard links with target of "new".


Any one heard of this before? Anyone any help?

I have tried buidling a simple test app add it does not do this. But these gridviews in my app seem to have nothing in common.
Oct 10 '07 #1
3 1216
Plater
7,872 Recognized Expert Expert
I had the same problem, but I know how to fix it!
The issue is that when you click on a pager_index, the whole page is being reloaded, so any of the gridviews that weren't involved in the paging, reset back to first page.

Here's what I did:
In my page_change event function, I added a pair to the session object called say "gridviewOrders " with the value of the page it is displaying.
I do the same with say "gridviewUs ers" (just examples, important thing is a different name for each gridview you want to track)

Then in the page_load event function, at the end, I check to see if these objects exist in the session, and if they do, change the gridview pages to the page saved in the session object..
Oct 10 '07 #2
Bob Ross
119 New Member
Thanks for you help but unfortunately this is not the same problem.
There is only one grid on the pages with the problem (other pages with two grids acutally work fine).
When the problem occours the first event I can catch after I have clicked on the pager is the page_load so there is no way of saving the page index.
Oct 10 '07 #3
Plater
7,872 Recognized Expert Expert
Ah yes, after re-reading it I see it now. That's what I get for not looking closely.
Oct 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
7189
by: S³awomir Marcinkowski | last post by:
Hello, can someone show use example use smarty pager plugin? {pager rowcount=$LISTDATA.rowcount limit=$LISTDATA.limit txt_first=$L_MORE class_num="fl" class_numon="fl" class_text="fl"} I'm fighing with it for 5 hours, and still don't have any results :( Slawek,Poland
36
10127
by: Richard | last post by:
My employer currently pays me $1/hour when I carry a pager. I have to carry the pager every fourth week. The problem is that my employer insists that I be available when I'm carrying the pager. So, for $1/hr they expect me to remain within pager range, remain sober, and be available to come to work. That really sucks on weekends. No going to the beach (out of pager range) or out to a friend's cottage (out of pager range), etc. ...
1
2099
by: strout | last post by:
I know it's dumb ... sometimes frustrating I want the text and a dropdownlist align with both side of a table cell, i.e. text align left and dropdownlist align right. I cannot add more cells to do format because it's in a Datagrid pager area. The html code generated for pager is one sigle cell with lots of colspan. I tried to add some html elements in between text and dropdownlist, for example table iframe and p but I cannot achieve...
0
1825
by: Ray | last post by:
I am trying to add a "Next >" and "<Prev" button to the pager of my datagrid. I have been able to add the hyperlinks to the pager. I am now trying to determine the correct postback script to emulate so that these hyperlinks force the postback of the appropriate linkbuttons in the pager. Let's take a pager with pager: 1 2 3 4 5 It consists of: linkbutton linkbutton label linkbutton linkbutton I want it to be: < Prev 1 2 3 4 5 Next > It...
0
1759
by: bdtmike | last post by:
I'm using the GridView control and have the Mode of the Pager set to "NumericFirstLast". However, when there are several pages to display, the pager shows only page numbers--and no First/Last buttons. First of all, is this a bug or am I doing something stupid? Secondly, can I override the page numbers using my own template? I'm using the latest Visual Studio 2005 Thanks.
1
3449
by: SMichal | last post by:
Hi, I need a liitle help with build of my custom pager for gridview...I made this kind of pager..I looks like this: << < 1 2 3 4 5 6 7 8 9 10 > Well...it's no bad but I wannt something like google pager: << < 1 2 3 4... > if user cliks on ... he should see this: << < ...5 6 7 8 ... >
0
879
by: Mr. SweatyFinger | last post by:
i need Previous 123456 Next How can i do this using the custom pager setting? thanks
2
1341
by: Stuart Ferguson | last post by:
I am using a GridView control with auto paging in a web application I am currently developing and was looking to customise the pager. I need to make the overall page numbers larger and also change the selected page number to be larger and bolder than the other numbers how can this be done. Any help would be appreciated. Stuart
5
3014
by: imbirek8 | last post by:
Hello I am looking good Pager to asp.net GridView Control. I would like to have: next/previous page, X results on page and go to X page. Can you recommend me a good (and free) Pager to GridView ? Thanks
0
9603
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
10644
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
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10393
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
9200
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
7664
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
6882
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();...
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.