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

Server Side on Click event

4 Answers 681 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 09 May 2013, 07:11 PM
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?

4 Answers, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 14 May 2013, 09:41 AM
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.
0
Sriram
Top achievements
Rank 1
answered on 02 Mar 2015, 05:57 AM
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.
0
Anil
Top achievements
Rank 1
answered on 23 Dec 2015, 09:27 PM

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

0
Plamen
Telerik team
answered on 25 Dec 2015, 01:48 PM
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
Tags
Chart (HTML5)
Asked by
Richard
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
Sriram
Top achievements
Rank 1
Anil
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or