Hi telerik,
I've used drag and drop from radwindow to radscheduler without problem utill 2012 Q3,
and now migrate to new drag and drop manager.
I changed DragQuery of RadGridView into new DragInitialize and event fires fine when start drag,
however can't drop in scheduleview nor drag cursor displayed. ScheduleViewDragDropBehavior
of scheduleview is not fired as well regardless of AllowDrop=ture setting in schedulerview.
My code is as follows;
Behavior is same with the one you provide in sample.
What am I missing ?
Thank you in advance.
Kang
I've used drag and drop from radwindow to radscheduler without problem utill 2012 Q3,
and now migrate to new drag and drop manager.
I changed DragQuery of RadGridView into new DragInitialize and event fires fine when start drag,
however can't drop in scheduleview nor drag cursor displayed. ScheduleViewDragDropBehavior
of scheduleview is not fired as well regardless of AllowDrop=ture setting in schedulerview.
My code is as follows;
/// GridView xaml for drag
<
telerik:RadGridView.RowStyle
>
<
Style
TargetType
=
"telerik:GridViewRow"
>
<
Setter
Property
=
"telerik:RadDragAndDropManager.AllowDrag"
Value
=
"True"
/>
</
Style
>
</
telerik:RadGridView.RowStyle
>
/// GridView events
DragDropManager.AddDragInitializeHandler(this.prodGridView, OnDragInitialize);
DragDropManager.AddGiveFeedbackHandler(this.prodGridView, OnGiveFeedback);
private void OnDragInitialize(object sender, DragInitializeEventArgs args)
{
args.AllowedEffects = DragDropEffects.All;
var payload = DragDropPayloadManager.GeneratePayload(null);
args.Data = ((FrameworkElement)args.OriginalSource).DataContext;
args.DragVisual = new ContentControl { Content = args.Data, ContentTemplate = this.Resources ["MachineTemplate"] as DataTemplate };
}
/// schedule view xaml
<
telerik:RadScheduleView
x:Name
=
"workSkdView"
AppointmentsSource
=
"{Binding ProdWorkSkdCollection}"
SpecialSlotStyleSelector
=
"{StaticResource SpecialSlotStyleSelector}"
SpecialSlotsSource
=
"{Binding SpecialSlots}"
AllowDrop
=
"True"
CurrentDate
=
"{Binding Path=CurrentDate}"
>
<
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:WeekViewDefinition
DayStartTime
=
"08:00:00"
DayEndTime
=
"23:59:59"
CalendarWeekRule
=
"FirstFourDayWeek"
MajorTickLength
=
"1h"
MinorTickLength
=
"30min"
StretchGroupHeaders
=
"True"
WeekGroupHeaderStringFormat
=
"{}{1:MM}월 {0}주차 "
/>
</
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:RadScheduleView.DragDropBehavior
>
<
my:WorkSkdDragDropBehavior
/>
</
telerik:RadScheduleView.DragDropBehavior
>
.
.
Behavior is same with the one you provide in sample.
What am I missing ?
Thank you in advance.
Kang