Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
Hi,

i have a requirement for dynamically creating RadHtmlChart , in this control there is one event OnClientSeriesClicked now i want to call a JavaScript on this event from backed through c#.

till now what i have done that i have created dynamically radhtmlchart and adding to panel.
panelChart.Controls.Add(RadHtmlChart1);

I am not getting a clear idea how to approach further and create that event .

i have crreated this method
C#
private void SeriesClicked(object sender, EventArgs e)
  {
      ClientScript.RegisterStartupScript(this.GetType(), "print", "<script>RadHtmlChart1_SeriesClicked();</script>");
  }



but dont know how to call this method on OnClientSeriesClicked event.

Plz help
Posted
Comments
Sergey Alexandrovich Kryukov 18-Apr-14 2:55am    
What does it mean, "generate an event"? why?
—SA
kumar9avinash 18-Apr-14 3:32am    
i want to say thta i just want to call the javascript from the codebehind using this event(OnClientSeriesClicked )of the chart control
Sergey Alexandrovich Kryukov 18-Apr-14 10:32am    
You never call Javascript (client side) from code behind (server side). This is not how Web works.
—SA

1 solution

OnClientSeriesClicked is client side event, call the eventhandler using javascript in your client side code.

XML
<script type="text/javascript">
       function OnClientSeriesClicked(sender, eventArgs) {
          
       } 
 </script>
 
Share this answer
 
Comments
kumar9avinash 19-Apr-14 0:23am    
Thanks for ur suggestion but if you know some example or code of this then plz post it , till then i am trying this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900