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

trying to add loading panel to my grid

3 Answers 170 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 17 Aug 2016, 05:04 PM
my code below.
no loading is shown - I have min time = 14 seconds
no alert is ever called
my grid I create and bind with code behind.

why is the loading panel not showing? what am I missing
is there a way for me to explicit call the show loading?
function requestStart(sender, eventArgs) {
    alert('Request start initiated by: ' + eventArgs.get_eventTarget());
}
<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" MinDisplayTime="14000"  Skin="Default" Modal="true">
<asp:Label ID="Label2" runat="server" ForeColor="Red">Loading... </asp:Label>
<asp:Image ID="Image1" runat="server" Width="224px" Height="48px" ImageUrl="/colors.png"></asp:Image>
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<ClientEvents OnRequestStart="requestStart" />
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="gv">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="gv" LoadingPanelID="LoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid RenderMode="Lightweight" ID="gv" runat="server" AutoGenerateColumns="false" CellSpacing="1" EnableViewState="true" />

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 22 Aug 2016, 10:19 AM
Hello Doug,

Based on the provided information it would be hard to pinpoint what is causing the behavior. The loading image should be displayed when the grid triggers a postback (e.g. on paging, sorting, etc.).

Nevertheless, would you remove the custom text and image from the loading panel and see if the behavior changes. Also, remove the Modal property.

<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" Skin="Default" >
</telerik:RadAjaxLoadingPanel>


Regards,
Viktor Tachev
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Doug
Top achievements
Rank 1
answered on 23 Aug 2016, 12:19 AM
first issue solved by changing the controlid to my button that gets my form
<telerik:AjaxSetting AjaxControlID="btnGetForm">

next issue was "The Controls collection cannot be modified because the control contains code blocks"
which I just had to put my <%=... into RadScriptBlocks

next issue was my grid was visible=false so I targeted my loading panel control to an outer asp:panel
now it worked ok but tended to add javascript time onto the page which in my specific case was already too much. I then had an issue that my grid is linking to a list and repeater that are shown separately and when I went into that area nothing showed.

like I said before my code is very complex. but at least I solved the issue of it to show now. I can use it in other areas as-is.

for this page I think I will just look into a direct showing a modal loading overlay and hiding it when my script ends.





0
Viktor Tachev
Telerik team
answered on 23 Aug 2016, 12:24 PM
Hello Doug,

I am glad that you have the issue resolved. Thank you for sharing the resolution with the community. This can help someone observing similar behavior.

Regards,
Viktor Tachev
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Doug
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Doug
Top achievements
Rank 1
Share this question
or