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

RadContextMenu doesn't attach to Canvas in Group Header

0 Answers 53 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sergey
Top achievements
Rank 1
Sergey asked on 03 Jul 2012, 01:18 PM
When I attach RadContextMenu to Canvas inside DataTemplate of GroupHeaderControlTemplate, group header's context menu gets overriden by the context menu that is attached to the ScheduleView:

<telerik:RadScheduleView.GroupHeaderContentTemplate>
    <DataTemplate>
        <Canvas Width="100">
            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu>
                    <telerik:RadMenuItem Header="Group Header Context Menu" />
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
        </Canvas>
    </DataTemplate>
</telerik:RadScheduleView.GroupHeaderContentTemplate>

<telerik:RadContextMenu.ContextMenu>
    <telerik:RadContextMenu>
        <telerik:RadMenuItem Header="Schedule View Context Menu" />
    </telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>

It works if you use TextBlock instead of Canvas in DataTemplate, but I want the context menu to appear even if the user doesn't right-click directly on the TextBlock but anywhere in the group header cell. The way I'm trying to achieve this is by putting transparent canvas over TextBlock and any other element I will put inside DataTemplate.
Tags
ScheduleView
Asked by
Sergey
Top achievements
Rank 1
Share this question
or