Show Dev Express Loading Panel using ASPxComboBox

I had a case where I wanted to show an ASPxLoadingPanel  when the user changed the the selection.  On a command button this is easy you just add a OnClientClick="ShowLoadingPanel()".

But since a Drop Down you need to show the loading panel on the Change Event DevExpress does not handle that unless you are doing a call back. In this case I had an 
ASPxComboBox on a page with an Update Panel and a Grid.

To get around this I added the following JavaScript in the C# code behind:

 BtnRefresh.Attributes.Add("onclick", "javascript:ShowLoadingPanel();");
Which calls...and shows the spinner.
    function ShowLoadingPanel() {     
         var prm = Sys.WebForms.PageRequestManager.getInstance();
     function prm_InitializeRequest(sender, args) {
     function prm_EndRequest(sender, args) {
Once the Grid is reloaded the spinner is gone...
Comments are closed