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

need help with radscheduleview raddragdropmanager and radcontextmenu

2 Answers 110 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Elneilo
Top achievements
Rank 1
Elneilo asked on 29 Jul 2011, 05:22 AM
hi there,

I'm fairly new to Telerik and WPF so I was wondering if someone could help me with a few questions.
My questions are related mainly to RadScheduleView Drag and Drop behavior and also the ability to show a RadContextMenu in a specific area of the radscheduleview control. I have included a sample project and the screenshot below.

1. If I drag a GridViewRow to a schedule view, is it possible to delete that row from my grid after it is dragged to the RadScheduleView ?
2. Is it possible to drag a GridViewRow and drag that row to the GroupHeader and then add a new resource ?
How can I do that?
3. Why does my custom ScheduleViewDragDropBehavior keep calling ConvertDraggedData
even if DragComplete is not actually reached in the OnDragInfo draghandler of my RadGridView ?
4. How can I setup my RadContextMenu to only show up in the GroupHeader to the left (I'm using Timeline View)?
Is it possible to hide ContextMenu when I right click the TimeViewDefinition area ?

SampleProject
AppScreenshot

2 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 04 Aug 2011, 02:24 PM
Hello Elneilo,

Straight to your questions:

1. You should use DragDropManager's DragDropCompleted event, I've added it to the project, please download the attachment and give it a try.

2. I'm afraid that this functionality is not supported by RadScheduleView.

3. When you drag items over RadScheduleView, the events of its DragDropBehavior are called, not the events of RadDragAndDropManager. If the destination is a different control which has RadDragAndDropManager.AllowDrop enabled,  DragComplete will be reached.

4. I would suggest to subscribe to ContextMenuOpening event of the ScheduleView and check whether it is opened for GroupHeader. I've modified the project to show how to implement this.
The other option is to place the context menu in GroupHeaderContentTemplate, you can try this approach as well.

All the best,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Elneilo
Top achievements
Rank 1
answered on 08 Aug 2011, 06:59 PM
Thanks Yana, you answered all my questions. I"m going to try the GroupHeaderContentTemplate approach when I get a chance.
Tags
ScheduleView
Asked by
Elneilo
Top achievements
Rank 1
Answers by
Yana
Telerik team
Elneilo
Top achievements
Rank 1
Share this question
or