RadContextMenu with RadTreeList and TreeListTemplateColumn

2 posts, 0 answers
  1. Fred
    Fred avatar
    7 posts
    Member since:
    Jan 2015

    Posted 30 Jan 2015 Link to this post

    When I have a RadTreeList with TreeListTemplateColumn defined, the RadContextMenu is not available when the mouse is over the Text for the Node.  When the mouse is moved off of the text, the RadContextMenu is available. By available, I mean right mouse click will bring up the menu.

    If I replace the TreeListTemplateColumn with a TreeListBoundColumn, the new RadContextMenu is available over the text.

    Thank you
  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 04 Feb 2015 Link to this post

    Hello Fred,

    Can you please elaborate a bit more on how the ContextMenu is attached to the item?

    I would suggest you to try using the approach below and see if this makes any difference:
    protected void RadTreeList1_ItemCreated(object sender, TreeListItemCreatedEventArgs e)
        if (e.Item is TreeListDataItem)
            TreeListDataItem dataItem = (TreeListDataItem)e.Item;
            dataItem.Attributes["oncontextmenu"] = "ShowContextMenu(" + dataItem.DisplayIndex + ");";

    You can refer to a similar demo using RadListView and RadContextMenu.

    Maria Ilieva

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top