0

I've created a custom section with a treeview. I want to remove the context menu that appears when you right click on the tree nodes because I don't want the user to be able to create/delete. I've been following a few tutorials on it and I've managed to remove all of the items but I'm left with an empty context menu that I can't seem to get rid of.

screenshot of empty context menu

The code to render the nodes is

public override void Render(ref XmlTree tree)
{
    XmlTreeNode xNode = XmlTreeNode.Create(this);
    xNode.NodeID = "1";
    xNode.Text = "Enquiry Form";
    xNode.Icon = "compliance.gif";
    xNode.Action = "javascript:listEnquiries()";
    xNode.Menu.Clear();        
    tree.Add(xNode);
}
user247702
  • 23,641
  • 15
  • 110
  • 157
GMon
  • 638
  • 6
  • 14

1 Answers1

0

You can't get rid of it, unfortunately, even if you remove the menu entirely, that thin box is still displayed.

If you could be bothered to trot through the source CSS for the back office, you might be able to add some CSS to make it not show up at all if there's no items maybe?

Tim
  • 4,217
  • 1
  • 15
  • 21