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

How to Ajaxify RadHtmlChart?

1 Answer 92 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Richard asked on 29 Oct 2013, 11:50 AM

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.

1 Answer, 1 is accepted

Sort by
Danail Vasilev
Telerik team
answered on 01 Nov 2013, 09:13 AM
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.
Chart (HTML5)
Asked by
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question