Runtime exception in chart control

Hello All,

I am using windows syncfusion chart control in web page and I am using for real time values so that I developed custom model for chart updation below is my code.

public void RaiseListChanged(ListChangedType listChangedType,int index)
{
if (this.trendSeries.TrendPointCollection.Count > 0)
{
try
{
if (this.Changed != null)
this.Changed(this, new ListChangedEventArgs(listChangedType, index));
}
catch (Exception ex)
{
System.Diagnostics.Trace.WriteLine(DateTime.Now.ToString() + ":" + ex.Message);
}
}
}

the line "this.Changed(this, new ListChangedEventArgs(listChangedType, index));"

throws exception saying that "cannot access disposed object"

Please tell me how do i fix this problem

I attached my error image too.

Thanks in Advance
K.Sathishkumar.

chartcontrol3.zip

2 Replies

SK Sathishkumar Kaliavaradhan February 6, 2007 02:23 PM UTC

Hi All,

Please anyone can help me, i am getting this error each time i am creating the chartcontrol object this error message is showing in ASP page

-----------------------------------
Cannot access a disposed object
object name:'TrendControl'
-----------------------------------
Name 'TrendControl' is class which inherit the class 'ChartControl'

And Stack trace is below

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'TrendControl'.
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.PointToClientInternal(Point p)
at System.Windows.Forms.Control.PointToClient(Point p)
at Syncfusion.Windows.Forms.Chart.ChartControl.toolTip_MouseMove(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Syncfusion.Windows.Forms.PopupControlContainer.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


With Regards
K.Sathishkumar.


AD Administrator Syncfusion Team February 7, 2007 11:38 AM UTC

Hi Satishkumar,

Sorry for the inconvenience caused.

Could you please provide us with a sample which reproduces the condition that you have mentioned here?

Thanks,
Ramya.


Loader.
Up arrow icon