This is a migrated thread and some comments may be shown as answers.

[Solved] show the loading panel next to AJAX initiator

1 Answer 111 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 05 Aug 2009, 03:22 AM
Hi All,
I have Loading Panel control in my page. I have RadGrid. There are search button on top of the grid and some grid command item.  I want to show the loading panel next to AJAX initiator, button, etc. Following is my code. But Loading Panel is always show on top and centre of Panel "Panel1". How do i positioning my Loading Panel?

<
telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                         <ClientEvents OnRequestStart="RequestStart"></ClientEvents> 
                            <AjaxSettings> 
                               <telerik:AjaxSetting AjaxControlID="rgFCCOffice"
                                   <UpdatedControls> 
                                       <telerik:AjaxUpdatedControl ControlID="Panel1" 
                                           LoadingPanelID="RadAjaxLoadingPanel1" /> 
                                   </UpdatedControls> 
                               </telerik:AjaxSetting> 
                               <telerik:AjaxSetting AjaxControlID="rtbtnFilter"
                                   <UpdatedControls> 
                                       <telerik:AjaxUpdatedControl ControlID="Panel1" 
                                           LoadingPanelID="RadAjaxLoadingPanel1" /> 
                                   </UpdatedControls> 
                               </telerik:AjaxSetting> 
                            </AjaxSettings> 
                        </telerik:RadAjaxManager> 
 
<asp:Panel ID="Panel1" runat="server"
                        <telerik:RadGrid ID="rgFCCOffice"  runat="server" AllowPaging="True" AllowSorting="True" 
                            AutoGenerateColumns="False" Skin="Office2007" 
                            Width="97%" ShowStatusBar="True"  
                            AutoGenerateEditColumn="false"  
                            onneeddatasource="rgFCCOffice_NeedDataSource"  
                            onitemdatabound="rgFCCOffice_ItemDataBound"  
                            oninsertcommand="rgFCCOffice_InsertCommand"  
                            onupdatecommand="rgFCCOffice_UpdateCommand" ShowFooter="false"  
                             AllowMultiRowSelection="True" CellPadding="1" CellSpacing="1"
                             
                        </telerik:RadGrid> 
                        </asp:Panel> 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px"
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" /> 
    </telerik:RadAjaxLoadingPanel> 
<script type="text/javascript"
    function RequestStart(sender, eventArgs) { 
        var divElementStyle = document.getElementById("<%=RadAjaxLoadingPanel1.ClientID%>").style; 
        divElementStyle.position = 'absolute'
        //position the loading panel 
        divElementStyle.left = eventArgs.get_eventTargetElement().offsetLeft + "px"; 
        divElementStyle.top = eventArgs.get_eventTargetElement().offsetTop + "px"; 
    } 
   </script> 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 05 Aug 2009, 09:23 AM
Hi Alex,

More information about how to show the loading panel on a specific position (next to the AJAX initiator for example) is available in the following help article:
Show the loading panel next to AJAX initiator 

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
Alex
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or