I have built an editor grid with pagingtoolbar in it and i am performing validation(checking if any dirty records exists in the grid) on beforechange event of pagingtoolbar.I am able to do that, But the problem I am facing is after the changes are committed the page do not change i.e it remains on the same page.

So, How do i detect whether the user has pressed first page,next page,last page or previous page key on pagingtoolbar.
Actually i want to perform validation on pagination and give user an alert box saying you have modified records in the page do you want to save those changes yes or no. And depending on what user clicks , i want to perform the specified task and then go to the page where he wanted to go.

Thanks & Regards