May 05, 2015, 2:13 PM
Remote paging not behaving properly after getting WarningOnDirty.
Hi,
I am using WarningOnDirty to show warning message on remote pagination of grid pannel. But if user clicks on NO button and clicks on Save button to save data from grid, its showing next page no in footer bar of grid. On button click i am calling on controller's method to save data in database and that method returns updated data to refresh grid through json.
.DirectEvents(de =>
{
de.Click.Url = (Url.Action("HandleChanges", "SetLaunchAttributes"));
de.Click.EventMask.ShowMask = true;
de.Click.ExtraParams.Add(new Parameter
(
"scenarioId",
"Ext.getCmp('hdnScenarioId').getValue()"
));
de.Click.ExtraParams.Add(new Parameter
{
Name = "data",
Value = "#{storeLaunchAttributes}.getChangedData({skipIdFo rPhantomRecords: false})",
Mode = ParameterMode.Raw,
Encode = true
});
de.Click.Success = "success";
})
below code I have written in "success" method-
var success = function (form, action) {
if (action.result != undefined) {
if (action.result.toString() == "true") {
App.grdSetLaunchAttributes.getStore().warningOnDir ty = false;
ResetDirty();
RPShowMessage("@PR.LS.Common.Resources.LS.DataSave dMsg", "Success", "effect", "divStatus");
App.grdSetLaunchAttributes.getStore().loadData(dat a);
Ext.getCmp('grdSetLaunchAttributes').getStore().re load();
App.grdSetLaunchAttributes.getStore().warningOnDir ty = true;
}
else {
RPShowMessage(action.message.toString(), "Error", "effect", "divStatus");
}
}
};
Also, I wanted to change message and header of WarningOnDirty. How can I change that?
Please help to resolve this. Thanks in advance.
I am using WarningOnDirty to show warning message on remote pagination of grid pannel. But if user clicks on NO button and clicks on Save button to save data from grid, its showing next page no in footer bar of grid. On button click i am calling on controller's method to save data in database and that method returns updated data to refresh grid through json.
.DirectEvents(de =>
{
de.Click.Url = (Url.Action("HandleChanges", "SetLaunchAttributes"));
de.Click.EventMask.ShowMask = true;
de.Click.ExtraParams.Add(new Parameter
(
"scenarioId",
"Ext.getCmp('hdnScenarioId').getValue()"
));
de.Click.ExtraParams.Add(new Parameter
{
Name = "data",
Value = "#{storeLaunchAttributes}.getChangedData({skipIdFo rPhantomRecords: false})",
Mode = ParameterMode.Raw,
Encode = true
});
de.Click.Success = "success";
})
below code I have written in "success" method-
var success = function (form, action) {
if (action.result != undefined) {
if (action.result.toString() == "true") {
App.grdSetLaunchAttributes.getStore().warningOnDir ty = false;
ResetDirty();
RPShowMessage("@PR.LS.Common.Resources.LS.DataSave dMsg", "Success", "effect", "divStatus");
App.grdSetLaunchAttributes.getStore().loadData(dat a);
Ext.getCmp('grdSetLaunchAttributes').getStore().re load();
App.grdSetLaunchAttributes.getStore().warningOnDir ty = true;
}
else {
RPShowMessage(action.message.toString(), "Error", "effect", "divStatus");
}
}
};
Also, I wanted to change message and header of WarningOnDirty. How can I change that?
Please help to resolve this. Thanks in advance.
Last edited by PriceRightHTML5team; May 12, 2015 at 7:30 AM.