Jun 21, 2014, 11:47 AM
[CLOSED] Problem with store reload
Controller
Button Code in View
And its happen frequently.but not any sequence ,Its happen sometime after 1click sometime on 5th click or 10th click.Is there any problem in my code?
public ActionResult reloadgrid()
{
object[] o = GetData().Cast<object>().ToArray();
return this.Store(o);
}
Button Code in View
X.Button()
.Text("Save")
.ID("btnSave")
.Listeners(l => l.Click.Handler = "return validation();")
.DirectEvents(de =>
{
de.Click.FormID = "f";
de.Click.Action = "save";
de.Click.EventMask.ShowMask = true;
de.Click.EventMask.Msg = "Saving...";
de.Click.EventMask.MinDelay = 100;
de.Click.After = "App.GridPanel1.getStore().reload();";
}),
Code in gridpanel in view.ServerProxy(X.AjaxProxy()
.Url(Url.Action("reloadgrid", "DefindTask"))
.Reader(X.JsonReader().Root("data"))
)
The problem is,data in grid not refresh every time ,for example,I click on save 3 times grid data refresh on 4th time not refresh but when i click for 5th time its working again.that means on 4th click grid not showing 4 rows its shows 3rows but on 5 4th click its shows 5 rows including the 4th row.And its happen frequently.but not any sequence ,Its happen sometime after 1click sometime on 5th click or 10th click.Is there any problem in my code?
Last edited by Daniil; Jun 27, 2014 at 10:56 AM.
Reason: [CLOSED]