Jul 01, 2014, 7:12 AM
[CLOSED] Problem with store reload if de.Click.FormID is present in DirectEvents
I have form panel inside window,and its contain a file upload along with other field.
View CODE
controller code
I fond if save action return type is void then reloadgrid function is called ,but I have a fileupload filed inside the formpanel
so my save action return type is DirectResult,and end of this f unction i write
DirectResult result = new DirectResult();
result.IsUpload = true;
I f i not doing this then fileupload give an error.
please see http://legalinfoservices.com/file.zip,I think from this 2 file you will understand the scenario
View CODE
.ServerProxy(X.AjaxProxy()
.Url(Url.Action("reloadgrid", "VendorRegistration"))
.Reader(X.JsonReader().Root("data"))
)
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.Complete = "App.GridPanel1.getStore().reload();";
})
controller code
public ActionResult reloadgrid()
{
object[] o = GetData().Cast<object>().ToArray();
return this.Store(o);
}
the problem is if de.Click.FormID = "f"; present then reloadgrid function is not called. but if i remove de.Click.FormID = "f"; the reloadgrid function is called but i am not getting value from controls inside from.I try with de.Click.Success also.I fond if save action return type is void then reloadgrid function is called ,but I have a fileupload filed inside the formpanel
so my save action return type is DirectResult,and end of this f unction i write
DirectResult result = new DirectResult();
result.IsUpload = true;
I f i not doing this then fileupload give an error.
please see http://legalinfoservices.com/file.zip,I think from this 2 file you will understand the scenario
Last edited by Daniil; Jul 08, 2014 at 5:24 AM.
Reason: [CLOSED]