Dec 26, 2011, 11:21 AM
[CLOSED] Validation on click of next/previous buttons of paging tool bar
Hi,
We have implemented remote paging for our store. I want validate my store whether it is dirty on click of next/previous buttons of paging tool bar and if dirty show a confirmation message. If the user selects to continue then load the next page else do not load the next page. I am calling below javascript on beforeload event of store.
Thanks
Anulekha
We have implemented remote paging for our store. I want validate my store whether it is dirty on click of next/previous buttons of paging tool bar and if dirty show a confirmation message. If the user selects to continue then load the next page else do not load the next page. I am calling below javascript on beforeload event of store.
var ValidateDataBeforeNavigate = function (store) {
var modifiedRecordsLength = store.getModifiedRecords().length;
if (modifiedRecordsLength > 0) {
Ext.Msg.confirm('Alert', 'You have uncommited changes. Your changes will be lost if you navigate to other page without saving the changes.Do you wish to continue?', function (btn) {
if (btn == "yes") {
Common.ShowMask('Loading inventory plan details...');
return true;
}
else
{ return false; }
});
return false;
}
else
{ Common.ShowMask('Loading inventory plan details...'); return true; }
};
please help.Thanks
Anulekha
Last edited by Daniil; Jan 02, 2012 at 8:22 AM.
Reason: [CLOSED]