This question is locked. New answers and comments are not allowed.
Hi, I would like to attach a context menu to a tree-column in the task-tree. Preferable only child tasks and not parent (summary) tasks.
I have implemented the code in one of your examples (RadContextMenu_MVVM) and the context menu works fine if I for instance attach it to an EventContainer:
in MainPage.xaml:
But if I add the same line for a TreeCellContainer the context menu does not display:
My treeView columns are defined like this:
It is only the TreeColumnDefinition I want a context menu for, NOT the ColumnDefinition.
Am I using the right target container for the items in the treeview? How do I make sure only the child tasks/events have a context menu in the task tree and not the parent summarty tasks?
Anne
I have implemented the code in one of your examples (RadContextMenu_MVVM) and the context menu works fine if I for instance attach it to an EventContainer:
in MainPage.xaml:
<Setter Property="telerik:RadContextMenu.ContextMenu" Value="{Binding Path=ContextMenu, Source={StaticResource ContextMenuHolder}}" /> But if I add the same line for a TreeCellContainer the context menu does not display:
<Style TargetType="telerik:TreeCellContainer" BasedOn="{StaticResource TreeCellEContainerStyle}"> <Setter Property="telerik:RadContextMenu.ContextMenu" Value="{Binding Path=ContextMenu, Source={StaticResource ContextMenuHolder}}" /> </Style>
My treeView columns are defined like this:
<telerik:RadGanttView.Columns> <telerik:ColumnDefinition Header="Progress" ColumnWidth="40" > <telerik:ColumnDefinition.CellTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Image x:Name="imgKlipp" Source="{Binding Progress, Converter={StaticResource DblToImageConverter}}" HorizontalAlignment="Right" Stretch="None" /> </StackPanel> </DataTemplate> </telerik:ColumnDefinition.CellTemplate> </telerik:ColumnDefinition> <telerik:TreeColumnDefinition Header="AO'er" MemberBinding="{Binding Title}" ColumnWidth="160"> </telerik:TreeColumnDefinition> </telerik:RadGanttView.Columns> It is only the TreeColumnDefinition I want a context menu for, NOT the ColumnDefinition.
Am I using the right target container for the items in the treeview? How do I make sure only the child tasks/events have a context menu in the task tree and not the parent summarty tasks?
Anne