Alert on moving to a different page of a grid when user changes contents of textboxes in a Grid

Posted by Ashish Gupta on Stack Overflow See other posts from Stack Overflow or by Ashish Gupta
Published on 2010-03-24T18:03:36Z Indexed on 2010/03/24 22:53 UTC
Read the original article Hit count: 325

Filed under:
|
|

In a ASP.NET application I have a paging RadGrid which shows up textbox in each row. Outside the grid, there is an OK button to save the content of all the textbox. If user changes text in any one or more of the textbox and without clicking on the "OK" button, tries to move to a different page number (of the grid by clicking on the page number), he should be prompted for confirmation of save or cancel the changes.

I am guessing that one can write a Javascript function which would look for any form input control (textbox in my case) and detect changes and If there are changes, would prompt the user. However, I am not sure where I can call this function from? Any suggestion on this or a better way to achieve this would be appreciated.

I am using RadGrid but I guess this should be applicable to GridView as well.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about gridview