htmlchart in not changing during drill down

2 posts, 0 answers
  1. umair
    umair avatar
    1 posts
    Member since:
    Nov 2013

    Posted 03 Jul 2014 Link to this post

    i am facing a problem that while doing drill down in htmlchat  when clicking on the series the method onClintSeriesClick calls but there is no effect on the graph. my code is..

    <telerik:RadAjaxManager runat="server" ID="ajaxmanager" OnAjaxRequest="ajaxmanager_AjaxRequest">
                        <telerik:AjaxSetting AjaxControlID="ajaxmanager">
                                <telerik:AjaxUpdatedControl ControlID="main_div" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>
                <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
                <telerik:RadCodeBlock ID="codeBlock" runat="server">
                    <script type="text/javascript">
                        function OnClientSeriesClicked(sender, args) {
                            $find("<%= ajaxmanager.ClientID %>").ajaxRequest(args.get_category());
                <div runat="server" id="main_div">
                <telerik:RadHtmlChart runat="server" ID="chart1" OnClientSeriesClicked="OnClientSeriesClicked">
                            <telerik:ColumnSeries Name="abc" DataFieldY="data"></telerik:ColumnSeries>
                        <XAxis DataLabelsField="label"></XAxis>
                    <asp:SqlDataSource ConnectionString="server=.\sqlexpress;database=record;integrated security=SSPI" SelectCommand="select * from tab1" ID="datasource1" runat="server">

                    <asp:SqlDataSource ConnectionString="server=.\sqlexpress;database=record;integrated security=SSPI" SelectCommand="select * from tab2" ID="datasource2" runat="server">

                <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" Height="77px" Width="113px" runat="server">

    cs file is.
     public partial class WebForm2 : System.Web.UI.Page
            protected void Page_Load(object sender, EventArgs e)
               // ajaxmanager_AjaxRequest(sender,new AjaxRequestEventArgs("umair"));

                if (!IsPostBack)
                    chart1.DataSourceID = "datasource1";

            protected void ajaxmanager_AjaxRequest(object sender, AjaxRequestEventArgs e)

                if (e.Argument.ToString() == "umair")
                    //chart1.DataSource = Class1.dt2;
                    chart1.PlotArea.Series[0].Name = "data";
                    chart1.DataSourceID = "datasource2";

    please help me out
  2. Marin Bratanov
    Marin Bratanov avatar
    3555 posts

    Posted 07 Jul 2014 Link to this post

    Hello Umair,

    Please make sure that:

    • the condition in the AjaxRequest handler is met. This means that the category that is clicked must be "umair" in your example while the chart has abc.
    • the chart is part of the partial rendering that comes down from the browser
    • the settings that you apply can work without AJAX (e.g., apply them on a simple button Click). Depending on the new data that is passed the old chart configuration may need more changes than just a series name. Once thigns work with full postbacks, they should work with partial ones as well, but full postbacks are easier to debug.

    I would also advise that you examine this demo's code carefully to see how we have implemented such a scenario and where the series data and code-behind need to match (e.g., the series Name):


    Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top