Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
485
Refreshing grid has no ajax indicator
posted

Back long ago with a ultrawebgrid we use to call

 

                var grid = igtbl_getGridById(gsGridName);

                grid.Rows.refresh();

this would make everything work great.  

 

After reading a few posts here, it looks like the recommended way of refreshing a grid from javascript is to use an ajax updatepanel with a button in it.  For test purposes I just click the button. Great, the grid is refreshed.  The problem is that I do not see the ajax refresh image while it reloads.  

Am I doing this correctly?  

Parents
No Data
Reply
  • 29417
    Verified Answer
    Offline posted

    Hello mland ,

     

    Since the grid won’t be the one invoking the update its ajax indicator won’t show. You can however manipulate when it shows and hides manually.

    Here are the steps you need to take:

    1.Handle the button's onClientClick event and in it get the instance of the ajax indicator and show it with:

    wdg.get_ajaxIndicator().show(wdg);

     

    2. Use Sys.WebForms.PageRequestManager  to hook a method to handle events after the asynchronous postback has finished.( For more information on this refer to: http://msdn.microsoft.com/en-us/library/bb311028.aspx .)For example:

         var prm = Sys.WebForms.PageRequestManager.getInstance();

            prm.add_endRequest(pageReloaded);

     And in that method hide the ajax indicator:

     

       function pageReloaded() {

                var wdg1 = $find("WebDataGrid1");

                wdg1.get_ajaxIndicator().hide();

            }

     

     

    Let me know if you have any questions or concerns regarding this.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

Children