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
    Admin
    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.

    Regards,
    Maria Ilieva
    Telerik
     

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top