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

    Hi,

    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
    Admin
    Stamo Gochev avatar
    157 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.

    Regards,
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sriram
    Sriram avatar
    1 posts
    Member since:
    Nov 2013

    Posted 01 Mar 2015 Link to this post

    Hi
    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.
  5. Anil
    Anil avatar
    8 posts
    Member since:
    Jun 2013

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

    Hi,

    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/

    Thanks,

    Anil

  6. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 25 Dec 2015 Link to this post

    Hello,

    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.

    Regards,
    Plamen
    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017