Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to perform certain actions after each callback (like MVCxGlobalEvents)

$
0
0

The main idea is to handle the jQuery.ajaxSuccess event for the document element, which is raised after each callback.

[JScript]
$(document).ajaxSuccess(function(){.................});


Starting with v.13.2, we've introduced the MVCxClientGlobalEvents object (see ASP.NET MVC - Provide the capability to handle the CallbackError event globally (implement an ASPxGlobalEvents equivalent)
It's possible to use the MVCxClientGlobalEvents.ControlsInitialized event handler for this purpose: 

[JScript]
MVCxClientGlobalEvents.AddControlsInitializedEventHandler(function(s, e){if(e.isCallback){//some action}});

 

Note that this event will be raised only for DevExpress callbacks.

See also: 
Ajax Events


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>