Determine if a callback is in progress (DevExpress)
I am looking for a way to determine if any of my DevExpress ASPxGridView controls are currently in a callback state. 开发者_如何学JAVA 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
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.
精彩评论