问题
I call cb.PerformCallback();
it looks working correctly but I can not get the e.result
.
it alerts "undefined".
I can both see "started" and "ended" alerts.
ASPxCallback cb = new ASPxCallback();
cb.ID = cb.ClientInstanceName = "cb";
cb.ClientSideEvents.BeginCallback = @"function (s,e) { alert('started'); alert(e.result); }";
cb.ClientSideEvents.EndCallback = @"function (s,e) { alert('ended'); alert(e.result); }";
how can I get e.result?
回答1:
Take a look at this:
http://documentation.devexpress.com/#AspNet/DevExpressWebASPxCallbackScriptsASPxClientCallback_CallbackCompletetopic
http://documentation.devexpress.com/#AspNet/DevExpressWebASPxClassesScriptsASPxClientBeginCallbackEventArgsMembersTopicAll
http://documentation.devexpress.com/#AspNet/DevExpressWebASPxClassesScriptsASPxClientEndCallbackEventArgsMembersTopicAll
回答2:
Handle the ASPxClientCallback.CallbackComplete event instead and use the e.result property (take attention to the character case):
http://demos.devexpress.com/ASPxperienceDemos/Callback/Example.aspx
来源:https://stackoverflow.com/questions/7992815/devexpress-aspxcallback-client-side-e-result-undefined