I have a Chart inside an UpdatePanel that is bound to a SqlDataSource. Outside the UpdatePanel, I have a dropdownlist. The SqlDataSource uses the selected value of the drop down list as a control parameter when selecting data that is used in the chart. By itself, this setup is working great. When I change the drop down list value, the chart updates. If the SqlDataSource returns 0 records, the chart shows the EmptySeriesMessage
However, I tried adding a Click event in the code behind. This is all I added:
Protected Sub RadChart1_Click(ByVal sender As Object, ByVal args As Telerik.Charting.ChartClickEventArgs) Handles
End Sub
Now when I change the selected item in the drop down list, everything works fine, but only if there SqlDataSource returns results. If the SqlDataSource has 0 results, then I get a JavaScript error and the chart does not update. The javascript error is PageRequestManagerServerErrorException Object reference not set to an instance of an object.
Can anyone help me? Is this a bug with the RadChart?