473,748 Members | 7,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid Paging and JavaScript

is there anyway to trap the client side paging event of the DataGrid in
JavaScript ?
If the user makes a change to a row, I want to warn them they will
lose changes before they page.

Many Thanks
Nov 19 '05 #1
1 1257
Unfortunately, the aspnet_client code for the DataGrid does not expose an
event for beforenextpagec lick event. You could modify the aspnet_client
javascript..... but then every datagrid would use that code.

Even most 3rd party controls don't expose this event. If you create your
own paging links control, then you could capture this.

This is what I did with great success.....
--
Direct Email: Michael.Baltic@ RemoveCharacter sUpTo#NCMC.Com

Staff Consultant II
Enterprise Web Services
Cardinal Solutions Group
"Jon Turner" wrote:
is there anyway to trap the client side paging event of the DataGrid in
JavaScript ?
If the user makes a change to a row, I want to warn them they will
lose changes before they page.

Many Thanks

Nov 19 '05 #2

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

Similar topics

2
3712
by: Ricardo Manuel | last post by:
Hi, I'm using a Datagrid that I fill with a Dataset but when I configure the paging with the Navigation Buttons I can't put them working, I've tried both methods (Next, Previous and Page Numbers) when I click on the Next link of the navigation buttons I see on status bar the folowing code -> Javascript:__doPostBack('Datagrid1$_ctl9 $_ctl1','') but nothing happens on Datagrid. I've configured the datagrid for 5 rows and Dataset
1
2352
by: Jeremy | last post by:
I want my gird to sort only the items on the current page when I click on a column header. I wrote a little test app, but when I sort it pulls in items from other pages and places them on the current page. i.e. If I have: IntegerValue StringValue CurrencyValue 0 Item 0 0 1 Item 1 1.23
4
1846
by: Happy | last post by:
hi I got a datagrid with Paging enabled which is getting populated thru a stored proc. I've given the code in the event grid.CurrentPageIndex = e.NewPageIndex grid.VirtualItemCount = //COUNT FROM STORED PROC grid.Datasource =a; grid.DataBind();
2
1379
by: George Durzi | last post by:
Is there a way to implement datagrid paging without using javascript on the client-side?
2
1863
by: Axel Dahmen | last post by:
Hi, I'm using a DataGrid control to show a table's content with paging. For navigation through the pages I'm using the DataGrid's intrinsic navigation section. My problem: The DataGrid navigation links use JavaScript to jump between pages. I want them to use standard hyperlinks providing the page number in some URL parameter so that I can copy the hyperlink elsewhere.
1
2135
by: Ed Chiu | last post by:
Hi, I copied the following codes from Internet to export datagrid to Excel, it works with datagrid not supporting sorting or paging. Response.ContentType = "application/vnd.ms-excel" Response.Charset = "" Response.AddHeader("Content-Disposition", "attachment;filename=Statement.xls") Me.EnableViewState = False
0
1822
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...
1
2394
by: the friendly display name | last post by:
Simple question: How to make datagrid paging work without javascript? I have a simple datagrid, which gets populated by a dataview, it works perfectly, paging works too, but, as I said, it does only with javascript. I know how to set the index of the grid etc. My Idea would be using my own links (with query-parameters attached on them, the parameter would transport the position of the targeted page in the grid) I just need basicaly a...
0
923
by: JimSnotes | last post by:
Hello, Does anybody know if you can use the PagedDataSource class in conjunction with a DataGrid in an ASP.NET 1.1 VB web page? I know that the DataGrid already has built in paging functionality, but it would be useful to be able to replace the javascript paging with search engine friendly query strings for the paging as described in this article: http://www.sitepoint.com/article/asp-nets-pageddatasource/ I have tried setting the...
0
8828
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
9537
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
9367
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
9319
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
8241
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...
0
6073
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
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2213
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.