Hi,
I have a radChart with some filters at the top that resubmit the database query to redraw the chart. Some of the filters produce no results from the database which means the chart stays the same. I thought clearing the series would solve it so I do this
rcBubble.Series.Clear();
But I get an error when there are no results and I try to do this. Can someone please tell me how I reset the chart if there are no results.
It's similair to this problem but this is for WPF -http://www.telerik.com/community/forums/wpf/chart/chart-is-not-reset-when-i-clear-series-and-do-not-add-new.aspx
The error incidentally doesn't occur within the actual radChart code but I see from the stack trace it's something to do with the chart:
I have a radChart with some filters at the top that resubmit the database query to redraw the chart. Some of the filters produce no results from the database which means the chart stays the same. I thought clearing the series would solve it so I do this
rcBubble.Series.Clear();
But I get an error when there are no results and I try to do this. Can someone please tell me how I reset the chart if there are no results.
It's similair to this problem but this is for WPF -http://www.telerik.com/community/forums/wpf/chart/chart-is-not-reset-when-i-clear-series-and-do-not-add-new.aspx
The error incidentally doesn't occur within the actual radChart code but I see from the stack trace it's something to do with the chart:
[NullReferenceException: Object reference not set to an instance of an object.] Telerik.Charting.RenderedObject.GetOrder() +6 Telerik.Charting.MapAreaBuilderBase.GetPath(IOrdering element, ArrayList list) +44 Telerik.Charting.MapAreaBuilderBase.AddImageMap(IOrdering elem, StringBuilder html, Boolean makeTooltipOnly) +239 Telerik.Charting.MapAreaBuilderBase.GenerateImageMap(IContainer container) +2274 Telerik.Web.UI.RadChart.RenderClassic(HtmlTextWriter writer) +1133 Telerik.Web.UI.RadChart.RenderContents(HtmlTextWriter writer) +387 Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer) +126 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245 ASP._masterpages_masterpage_master.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in c:\Projects\LogIT\_masterpages\MasterPage.master:27 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +314 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245 System.Web.UI.Page.Render(HtmlTextWriter writer) +39 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5289