Refresh RadHtmlChart with Javascript and show loading spinner

4 posts, 0 answers
  1. Michael
    Michael avatar
    17 posts
    Member since:
    Jan 2014

    Posted 29 Feb Link to this post

    In case of RadGrid I can do this:

    var RadGrid = $find('<%=RadGrid.ClientID %>').get_masterTableView();
    RadGrid.fireCommand("Update", 0);

    This refreshs my RadGrid and is showing the ajaxLoadingPanel with the spinner.

    I try to do the same for RadHtmlChart like this:

    var radHtmlChartObject = $find("<%=VersionsChart.ClientID %>");
    radHtmlChartObject.repaint();
    //or
    radHtmlChartObject.loadData();

    It refreshes/repaints the chart but I cannot see the loading animation. The RadAjaxManager is configured the same way for both controls, here for the RadHtmlChart:

    <telerik:AjaxSetting AjaxControlID="VersionsChart">
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="VersionsChart" LoadingPanelID="RadAjaxLoadingPanel1" />
        </UpdatedControls>
    </telerik:AjaxSetting>

    How can I make the spinner appear also in case of the RadHtmlChart?

     

     

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 01 Mar Link to this post

    Hello Michael,

    Note that the fireCommand() client method is performing post to the server which is actually an Ajax request and therefore the LoadingPanel appears. When calling repaint() no request to the server is made therefore no Ajax is performed in this case.
    You can try to invoke manual ajaxRequest if needed as shown below:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/ajaxmanager/client-side-programming/overview


    Regards,
    Maria Ilieva
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Michael
    Michael avatar
    17 posts
    Member since:
    Jan 2014

    Posted 01 Mar in reply to Maria Ilieva Link to this post

    Could you provide me with an example for my use case?
  5. Michael
    Michael avatar
    17 posts
    Member since:
    Jan 2014

    Posted 01 Mar Link to this post

    got it.

    function AjaxRequestButton(arguments) {
        var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
        ajaxManager.ajaxRequestWithTarget('<%= Chart.UniqueID %>', '');
    }

    and in the RadAjaxManager:

    <telerik:AjaxSetting AjaxControlID="AdminServiceVersionsChart" >
        <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="AdminServiceVersionsChart" />
        </UpdatedControls>
    </telerik:AjaxSetting>

     

Back to Top