Server Side on Click event

5 posts, 0 answers
  1. Richard
    Richard avatar
    15 posts
    Member since:
    May 2012

    Posted 09 May 2013 Link to this post


    In the RadChart there is a server side click event which does a postback can we achieve the same with the HtmlChart?

    In my scenario I need to do a postback when a slice on a pie chart or a bar on a bar chart is clicked. After the post back I load some data in a RadGrid and display it which relates to the series/slice/bar clicked.

    Can this sort of functionality be achieved using the HtmlChart?
  2. Stamo Gochev
    Stamo Gochev avatar
    188 posts

    Posted 14 May 2013 Link to this post

    Hi Richard,

    The RadHtmlChart provides a client side OnClientSeriesClicked event, which is triggered when you click on a series item.  You could use this event together with the RadAjax Manager, whose main idea is to do a partial page updates (not a postback). This means that you will be able to update the RadHtmlChart when you click on a series item without reloading the whole page with an AJAX request.

    A similar scenario is shown in our RadHtmlChart's Drill-Down demo, which demonstrates how you can click on a series item, load some data and display the new data in the RadHtmlChart. You could use this demo as a base and modify it in order to get the final result you want. Could try this approach and tell me if you need any help?

    You can also consider the __doPostBack() function from the framework to initiate full postbacks. More information about it is available in the net, for example here.

    Stamo Gochev
    the Telerik team
    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 their blog feed now.
  3. Sriram
    Sriram avatar
    1 posts
    Member since:
    Nov 2013

    Posted 01 Mar 2015 Link to this post

    Can anyone help me with how to create a rad html chart dynamically from code behind and how to add drill down functionality to that chart?
    Everything should be dynamic i.e from code behind.

    Thanks in advance.
  4. Anil
    Anil avatar
    8 posts
    Member since:
    Jun 2013

    Posted 23 Dec 2015 in reply to Sriram Link to this post


    I am looking for similar thing. I have a stacked column chart and I need to load another page when a user clicks on a series in that bar chart.

    I am loading chart dynamically.

    Were you able to fix your problem/



  5. Plamen
    Plamen avatar
    2817 posts

    Posted 25 Dec 2015 Link to this post


    You can use the onSeriesClick event, set the value in a HiddenField value the can be used on the server and trigger the __doPostBack  or the AjaxRequest and proceed with your custom logic.

    Hope this will help you solve the issue.

    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
Back to Top