Devexpress ASPxCallback client side e.Result undefined

徘徊边缘 提交于 2019-12-25 02:43:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!