确定回调是否正在进行中 (DevExpress)
我正在寻找一种方法来确定我的任何 DevExpress ASPxGridView 控件当前是否处于回调状态。我假设这些控件使用标准 ASP.NET 回调过程,但我不确定。如果是这种情况,可能有一个 ASP.NET(非 DevExpress)方法来确定这一点。
具体来说,我需要在发生回调时禁用提交按钮,因为在回调期间单击它会导致页面进入错误状态,并在未来的回调中给出低级 ASP.NET“无效的回发或回调参数”事件验证错误/提交。
我正在使用 jQuery,.ajaxSend() 和类似的全局 jQuery AJAX 方法不会捕获回调。
谢谢
I am looking for a way to determine if any of my DevExpress ASPxGridView controls are currently in a callback state. I assume those controls use standard ASP.NET callback procedure but I am not sure. If that is the case there might be an ASP.NET (non-DevExpress) method of determining this.
Specifically, I need to disable a submit button when a callback is occuring because clicking it during a callback causes the page to enter a bad state and give low-level ASP.NET 'Invalid postback or callback argument' event validation errors on future callbacks/submits.
I am using jQuery and the .ajaxSend() and similar global jQuery AJAX methods aren't capturing the callback.
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以通过以下任一方式确定 ASPxGridView 处理回调请求时的状态:
1) 利用客户端 ASPxClientGridView.InCallback() 方法(使用 ASPxGridView 的 ClientInstanceName) strong> 属性来访问客户端编程 ASPxGridView 的对象);
2) 处理客户端 ASPxClientGridView.BeginCallback 事件以存储指示 DevExpress 回调已开始的信息,并处理客户端 ASPxClientGridView.EndCallback 事件以清除此状态。我建议您使用不可见的 ASPxGlobalEvents 组件并处理其客户端事件(具有相同名称)来处理此状态。
It is possible to determine the state when ASPxGridView processes a callback request in any of the following way:
1) Utilize the client-side ASPxClientGridView.InCallback() method (use the ASPxGridView's ClientInstanceName property to get access to the client-side programmatic ASPxGridView's object);
2) Handle the client-side ASPxClientGridView.BeginCallback event to store the information indication that the DevExpress' callback has started and the client-side ASPxClientGridView.EndCallback event to clear this state. I suggest you use the invisible ASPxGlobalEvents component and handle its client-side event (with the same names) to handle this state.