New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Hide Waiting Cursor while Grid Opens for Editing

In case you have a grid with lots of records being shown at once, waiting for the Grid to open a row for editing might take some time, during which, the "waiting cursor" will be stuck over the grid. This might be unwanted especially if using Ajax and LoadingPanel. Luckily, you can handle the client OnRequestStart and OnRequestEnd events of RadAjaxManager (which ajaxifies the grid) to manually hide the hour glass cursor or replace it with the default one.

Here is some sample code:

<telerik:RadAjaxManager id="RadAjaxManager1" runat="server">
  <AjaxSettings>    
    <telerik:AjaxSetting AjaxControlID="RadGrid1">       
      <UpdatedControls>          
      <telerik:AjaxUpdatedControl ControlID="RadGrid1" />       
      </UpdatedControls>    
    </telerik:AjaxSetting>  
  </AjaxSettings>  
  <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
</telerik:RadAjaxManager>
<telerik:RadGrid RenderMode="Lightweight" id="RadGrid1" runat="server" ... />           
<style type="text/css">        
.hidewaiting td        
{            
 cursor: default;        
}           
</style>
<script type="text/javascript">
   function RequestStart(){       
       var grid = $find("<%= RadGrid1.ClientID %>");     
       grid.Control.className = "hidewaiting";
    }
    function ResponseEnd()
    {     
      var grid = $find("<%= RadGrid1.ClientID %>");   
      grid.Control.style.cursor = "";
    }       
</script>
In this article