开发者

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

开发者 https://www.devze.com 2022-12-24 18:08 出处:网络
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 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.


I am not sure if this will help exactly but it might at least give you an idea:http://www.codeproject.com/KB/ajax/ajaxdirtypanelextender.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号