Hi there, through out our app we use the treeview everywhere - but we have had this issue where it crashes when someone right clicks on the treeview where there is no node. This crash happens on the "ContextMenuOpening" event when we try to use e.TreeElement. This is because, on the telerik side of things, the getter for that property is throwing a NullReferenceException (see attached screenshot)
I think this is happening because in your RadTreeViewCancelEventArgs.cs it is this:
public RadTreeViewElement TreeElement
{
get { return node.TreeViewElement; }
}
public RadTreeView TreeView
{
get { return node.TreeView; }
}
But since node == null, it throws the exception. It probably should check for null, and if node is null, return a null for those properties - so we can use null conditional operator to check stuff. We have a workaround but it is just lots of copy and paste of things.