setting click event in VB, help please!

Jun 5, 2012 at 12:14 AM

Hey guys

 

Trying to set up a click event for a series in VB.net

<highchart:LineChart ID="hcPatsPerCategory" runat="server" Width="98%" Height="300">
</highchart:LineChart>

 

after loading (*and tested before)

    hcPatsPerCategory.PlotOptions.events = New PlotOptionEvents() With {.click = "alert('test');"}

 

Anyone have any suggestions?  this is not emitting the JS.  Thanks

Jun 7, 2012 at 3:34 PM

ok, posting the answer, the problem was in how I was instantiating the event.

        Dim per As New PlotOptionEvents
        per.click = "document.location.href = 'posummary.aspx?type=' + event.point.series.name;"

It's also important to do this before setting series and databinding.

May 29, 2013 at 11:01 AM
Hi,

Can I know why my code is not working with the code above. My click event is not working.
I have one question. Can I use the click event of the highcharts to show gridview or table details.

Thank you. Appreciate so much with the help.