When I try to check/uncheck parent item means, child item will not be checked\unchecked..
If I tried to Uncheck\Check the cparent node when checking\unchecking child node, object null reference exception is thrown. Below are the call stack
Error :
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Tools.TreeViewAdv.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Tools.TreeViewAdv.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Is it possible to provide proactive null checks there?
Hi Elakkiya,
Thanks, Sharing your comments,
Actually, I
am using the TreeviewAdv base class. Whenever we check/uncheck " Event_AfterInteractiveChecks"
event is called. This method is responsible for handling the display of the
selection in tree view.
There are couple of ways we can check/uncheck the treeview. One is through mouse click and other is through space bar. In both the ways, Event_ AfterInteractiveChecks method is called. During mouse click, it is called through the event OnMouseDown as per the below call stack and there is no issues.
During space bar, it is called through the event OnKeyDown. the treeview we select treeview and we press the space bar on keyboard,
If the checkboxes property is
set to true and the handled property is set to false, the OnKeyDown method switches between selecting and
clearing the check box when the user presses the SPACEBAR.
as per the above call stack, and throw an error in
Error :
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Tools.TreeViewAdv.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Tools.TreeViewAdv.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
It is throwing the exception from syncfusion code. Once the Event_AfterInteractiveChecks method is finished, we are getting the exception.