We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ej Button and Waiting Popup

Hello,

I need to display waiting pop up on ej button click event. Its not working for me. My ej button is on Accordion. I don't see any Javascript error.

-----
  <div class="col-md-3">
                @(Html.EJ().Button("ClearFilter")
                .Width("200px")
                .Text("Clear Filter")
                .ShowRoundedCorner(true)
                .Size(ButtonSize.Large)
                .ClientSideEvents(eve => { eve.Click("clearfilter"); })
                )
            </div>
----

<div class="controlframe">
    <div id="target"></div>
    @Html.EJ().WaitingPopup("target").ShowOnInit(false).Text("Please wait")
</div>


 function clearfilter()
           {
               var popupObj = $("#target").data("ejWaitingPopup");

               popupObj.show();

               var gridObj = $("#FlatGrid").data("ejGrid");
               gridObj.model.filterSettings.filteredColumns = [];

               var gridcolumns = (gridObj.getVisibleColumnNames());
               var arr = JSON.parse(JSON.stringify(gridcolumns));
               $.each(arr, function (i) {
                  
                   if (arr[i] != undefined) {
                       gridObj.clearFiltering(arr[i]);
                   }
               });

               popupObj.hide();
              

           }

1 Reply

DL Deepa Loganathan Syncfusion Team September 20, 2016 09:27 AM UTC

Hi Arun,  
Thanks for contacting Syncfusion support. 
We have tried to reproduce the reported issue by rendering Button control inside Accordion and show the WaitingpopUp control upon button click. But we are not able to reproduce the issue on our end.  
This issue is most likely to occur if Script Manager is not referred in Master page layout.  
Please note that client side script will be injected only if Script Manager is referred in the Master page. 
Add the below code refer ScriptManager to Master page layout. 
 
@Html.EJ().ScriptManager() 
 
 

View Page we have tried on our end 
 
<div id="ControlRegion"> 
    @Html.EJ().Accordion("template").Items(data => data.Add().Text("First").ContentTemplate(@<div class="col-md-3"> 
        @(Html.EJ().Button("ClearFilter") 
                .Width("200px") 
                .Text("Clear Filter") 
                .ShowRoundedCorner(true) 
                .Size(ButtonSize.Large) 
                .ClientSideEvents(eve => { eve.Click("clearfilter"); }) 
        ) 
    </div>)) 
    <div class="controlframe"> 
        <div id="target"></div> 
        @Html.EJ().WaitingPopup("target").ShowOnInit(false) 
    </div> 
</div> 
<script> 
    function clearfilter() { 
        var popupObj = $("#target").data("ejWaitingPopup"); 
        popupObj.show(); 
        // Data processing 
        setTimeout(function () { 
            alert("data processed"); 
            popupObj.hide(); 
        }, 100) 
         
    } 
</script> 
 
 

Please check our help documents for more details. 
If the issue is still not resolved after trying the above solution, then please get back to us with a sample to replicate the reported issue. We will be happy to assist you.  
Regards,  
Deepa Loganathan. 


Loader.
Live Chat Icon For mobile
Up arrow icon