How to Ajaxify RadHtmlChart?

2 posts, 0 answers
  1. Richard
    Richard avatar
    18 posts
    Member since:
    May 2012

    Posted 29 Oct 2013 Link to this post


    I am trying to Ajaxify the RadHtmlChart.

    Please note that this is in a custom Web Part in SharePoint 2010.

    On my page I have a RadHtmlChart that displays a donut chart. Clicking on a slice does a postback which displays the data in a RadGrid. I would like to ajaxify all of this so that there is no postback when a slice is clicked and data is shown in the RadGrid. I would also like to Ajaxify the RadGrid so when the sort/paging buttons are clicked then there is no full postback.

    I have searched to find some examples but I have failed to find an example that demonstrates how to ajaxify the radhtmlchart therefore can you please kindly point me to an example or post code that will achieve this. A sample SharePoint 2010 Web Part that achieves this would be greatly appreciated.
  2. Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 01 Nov 2013 Link to this post

    Hello Richard,

    There is nothing special in the ajaxification of a RadHtmlChart control.  This is done like any other script control - you can use RadAjaxManager, RadAjaxPanel or a standard asp UpdatePanel. For example:

    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
        <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Width="500px" Height="400px">
                            <telerik:CategorySeriesItem Y="30" />
                            <telerik:CategorySeriesItem Y="10" />
                            <telerik:CategorySeriesItem Y="20" />
        <telerik:RadButton ID="RadButton1" runat="server" Text="PostBack" />

    Note that a scenario in which you try to ajaxify telerik controls which are positioned within a user controls works differently than a scenario when controls are loaded directly on a web form. Therefore you need to create the RadAjaxManager control to the web part class and add it to the Controls collection of the web part itself.

    More information as well as an example on how to do that is available in telerik ajax issue with sharepoint 2010 forum thread. You can also find useful Create an AJAX-enabled SharePoint WebPart that uses RadControls help article which gives more information on the topic.

    Danail Vasilev
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top