This is a migrated thread and some comments may be shown as answers.

RadContextMenu with RadTreeList and TreeListTemplateColumn

1 Answer 52 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Fred
Top achievements
Rank 1
Fred asked on 30 Jan 2015, 08:27 PM
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

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 04 Feb 2015, 08:47 AM
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.

 
Tags
TreeList
Asked by
Fred
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or