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

DragDrop inside RadPanelBar fails

5 Answers 46 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Kotte
Top achievements
Rank 1
Kotte asked on 05 Sep 2011, 10:30 PM
Hi,

DragDrop inside RadPanelBar  is not working.
It is firing CanStartDrag and CanDrop event never fires.
Here is the code.

<telerik:RadPanelBar  x:Name="radPanelBar1"  IsTextSearchEnabled="False" VerticalAlignment="Stretch" Margin="0" d:LayoutOverrides="VerticalAlignment" HorizontalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
                    <telerik:RadPanelBarItem x:Name="Calendar"
 HorizontalAlignment="Stretch">
                        <telerik:RadPanelBarItem.Header>
                            <StackPanel Orientation="Horizontal">
                              
                            </StackPanel>
                        </telerik:RadPanelBarItem.Header>
                        <Grid Background="White">
                            <scheduleView:RadScheduleView x:Name="scheduler" ActiveViewDefinitionIndex="2"                                                    telerik:StyleManager.Theme="Windows7"  FontSize="9" FontFamily="Arial"  >
                                <scheduleView:RadScheduleView.ViewDefinitions>
                                    <scheduleView:DayViewDefinition ShowAllDayArea="True"  ShowWeekGroupHeaders="True" />
                                    <scheduleView:WeekViewDefinition ShowAllDayArea="True"  ShowWeekGroupHeaders="True"/>
                                    <scheduleView:MonthViewDefinition VisibleDays="30"  />
                                </scheduleView:RadScheduleView.ViewDefinitions>
                                <telerik:RadScheduleView.DragDropBehavior>
                                    <Calendar:CustomDragDropBehavior></Calendar:CustomDragDropBehavior>
                                </telerik:RadScheduleView.DragDropBehavior>
                            </scheduleView:RadScheduleView>
                        </Grid>
        </telerik:RadPanelBarItem>
</telerik:RadPanelBar> 


 public class CustomDragDropBehavior : ScheduleViewDragDropBehavior 
    {
        public override bool CanDrop(DragDropState state)
        {
            return true;
        }
        public override bool CanStartDrag(DragDropState state)
        {           
            return true;
        }

        public override void Drop(DragDropState state)
        {
            base.Drop(state);
        }

}

It is working fine when I don't keep Scheduler inside RadPanelBar.

5 Answers, 1 is accepted

Sort by
0
Kotte
Top achievements
Rank 1
answered on 06 Sep 2011, 02:35 PM
Hi Telerik,

Can some one please look in to this issue.
It is very important to my project....
0
Yana
Telerik team
answered on 12 Sep 2011, 02:28 PM
Hello Kotte,

We'll need more time to research this problem with the drag and drop, for now please set ExecutionMode of the RadDragAndDropManager in order to workaround it like this:

RadDragAndDropManager.ExecutionMode = DragExecutionMode.Disabled;
InitializeComponent();

Note that the code is executed before InitializeComponent().

Hope this helps.

Kind regards,
Yana
the Telerik team

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

0
Kotte
Top achievements
Rank 1
answered on 12 Sep 2011, 03:31 PM
Hi Yana,

Thank you for the response.
DragDrop is working fine now.


Thanks,
Kotte.
0
Kotte
Top achievements
Rank 1
answered on 22 Sep 2011, 04:45 PM
Hi Yana,

We updated the Telerik controls to the latest version ..Q2 2011  SP1 (version 2011.2.0920).
The workaround you suggested me to make the DrapDrop feature work inside RadPanelBar is not working any more.

RadDragAndDropManager.ExecutionMode = DragExecutionMode.Disabled;

Can you please check this and suggest me some solution as soon as possible, as our project is going live with in next few weeks.


Thanks,
Kotte.
0
Yana
Telerik team
answered on 26 Sep 2011, 02:55 PM
Hi Kotte,

We've tested the drag and drop with the service pack and it worked with the workaround without a problem.  Can you check whether you haven't changed anything else?

Greetings,
Yana
the Telerik team

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

Tags
ScheduleView
Asked by
Kotte
Top achievements
Rank 1
Answers by
Kotte
Top achievements
Rank 1
Yana
Telerik team
Share this question
or