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

Show UpdateProgress on RadTreeList ChildItemsDataBind

3 Answers 13 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 12 Jun 2019, 07:33 PM

I have a situation in which I create the next level of items in a TreeList in the ChildItemsDataBind event.

At some levels of the tree, there are a large number of child items being created.

And, each of these items requires a lengthy query to obtain the fields to populate it.

This scenario can take as long as 10 seconds or more in some cases.

When this case arises, the user has no idea if anything is happening and may believe the page is frozen or has crashed.

I need to display a ProgressArea or UpdateProgress to make it clear work is being done.

I can do this no problem by initiating the process with something like a button click event.

What I would like to do is have this process initiated when a specific item of the TreeList level is selected.

Is there a way to initiate and display a ProgressArea or UpdateProcess from some TreeList event?

3 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 13 Jun 2019, 12:26 PM

Sorry, here is the body of the latest code I have tried:

<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true"></telerik:RadScriptManager>
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">          
             <AjaxSettings>       
                <telerik:AjaxSetting AjaxControlID="trelHierarchy">
                   <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="trelHierarchy" />
                   </UpdatedControls>
                </telerik:AjaxSetting>
             </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" IsSticky="True" runat="server" AlternateText="Loading..."        Skin="Default" MinDisplayTime="100" Modal="true" style="position:absolute;">
            </telerik:RadAjaxLoadingPanel>
        
           <div>
              <table style="width:100%">
                  <tr>
                      <td>
                           <telerik:RadTreeList>

                                <%--My treelist structure--%>

                          </telerik:RadTreeList>
                      </td>
                  </tr>
              </table>
         </div>
        
    </form>
</body>

0
John
Top achievements
Rank 1
answered on 13 Jun 2019, 02:29 PM

It appears I need to add LoadingPanelID to the AjaxUpdatedControl...

<telerik:AjaxUpdatedControl ControlID="trelHierarchy" LoadingPanelID="RadAjaxLoadingPanel1" />

When I add that, I do get the Loading panel to display....but it only works the first time.

I.e. I appears on the first tree item I expand, but nothing happens for an subsequent tree items expansions.

0
Eyup
Telerik team
answered on 17 Jun 2019, 01:07 PM
Hello John,

Your approach is correct and the loading panel should be displayed on every load:
https://demos.telerik.com/aspnet-ajax/treelist/examples/databinding/loadondemand/defaultcs.aspx

There might be some script error to prevent its appearance. You can temporarily disable AJAX to check that:
https://www.telerik.com/support/kb/aspnet-ajax/ajaxmanager/details/get-more-descriptive-errors-by-disabling-ajax

I hope this will prove helpful.

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TreeView
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or