Hello,
I have upgraded to the Q2 2011 version of the ScheduleView (I need the EnableSmallAppointmentRendering). I have a requirement to drag from a listbox to the ScheduleView to create an appointment and this was all working using Q1 2011 SP1. I corrected all the compile errors but the drag no longer starts on the listbox.
I checked the samples and noticed that the Drag Drop sample for the ScheduleView was commented out. I uncommented it and get the same behavior (the drag never starts).
I also tried to set the RadDragAndDropManager.ExecutionMode to DragExecutionMode.Legacy and while that allows the drag to start, it does not appear that the ScheduleView recognizes the drop as no appointment is created.
Please help...I really must have both the drag/drop and the EnableSmallAppointmentRendering.
Thank you,
Michelle
I have upgraded to the Q2 2011 version of the ScheduleView (I need the EnableSmallAppointmentRendering). I have a requirement to drag from a listbox to the ScheduleView to create an appointment and this was all working using Q1 2011 SP1. I corrected all the compile errors but the drag no longer starts on the listbox.
I checked the samples and noticed that the Drag Drop sample for the ScheduleView was commented out. I uncommented it and get the same behavior (the drag never starts).
I also tried to set the RadDragAndDropManager.ExecutionMode to DragExecutionMode.Legacy and while that allows the drag to start, it does not appear that the ScheduleView recognizes the drop as no appointment is created.
Please help...I really must have both the drag/drop and the EnableSmallAppointmentRendering.
Thank you,
Michelle
11 Answers, 1 is accepted
0
Hi Michelle,
Could you please, open a new support ticket and send us your code that handles the drag-drop? We will reply with instructions how to fix it immediately.
Best wishes,
Valeri Hristov
the Telerik team
Could you please, open a new support ticket and send us your code that handles the drag-drop? We will reply with instructions how to fix it immediately.
Best wishes,
Valeri Hristov
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
0

Michelle
Top achievements
Rank 1
answered on 15 Jul 2011, 04:35 PM
Thank you. I have submitted a support ticket (443973) along with a sample application.
Regards,
Michelle
Regards,
Michelle
0

Rod Yager
Top achievements
Rank 1
answered on 26 Jul 2011, 08:44 PM
I am having a similar problem. I changed the executionmode that at least enabled me to start my drag from a listview, however now in my drag behavior handler, the appointments coming across as being dragged are no longer the custom appointment objects that I specified in the payload for the drag query handler. Any ideas?
Rod
Rod
0
Hello Rod,
I would need your code to provide more specific advice, but you could check if in the ConvertDraggedData method you are returning the correct appointments.
Greetings,
Valeri Hristov
the Telerik team
I would need your code to provide more specific advice, but you could check if in the ConvertDraggedData method you are returning the correct appointments.
Greetings,
Valeri Hristov
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
0

Rod Yager
Top achievements
Rank 1
answered on 27 Jul 2011, 02:20 PM
My DragQuery Handler where my custom Appt objects are instantiated...
My custom DragDropBehavoir class. On drop, the dragged appointments are not my MetrixTaskAppointments anymore. They come accross as just Appointments. This used to work before upgrading to the Q2 controls.
protected
virtual
void
OnDragQuery(
object
sender, DragDropQueryEventArgs e)
{
if
(e.Options.Status == DragStatus.DragQuery)
{
ListView mlv = sender
as
ListView;
ObservableCollection<MetrixTaskAppointment> appointments =
new
ObservableCollection<MetrixTaskAppointment>();
if
(mlv.SelectedItems.Count == 0)
{
return
;
}
DataView resultListSource = mlv.ItemsSource
as
DataView;
foreach
(DataRowView drv
in
mlv.SelectedItems)
{
MetrixTaskAppointment appointment =
new
MetrixTaskAppointment();
appointment.Start = DateTime.Now;
appointment.End = DateTime.Now.AddMinutes(60);
appointments.Add(appointment);
}
if
(appointments.Count > 0)
{
e.Options.DragCue = CreateDragCue(appointments);
ScheduleViewDragDropPayload payload =
new
ScheduleViewDragDropPayload(
null
, appointments);
e.Options.Payload = payload;
}
}
e.QueryResult =
true
;
}
My custom DragDropBehavoir class. On drop, the dragged appointments are not my MetrixTaskAppointments anymore. They come accross as just Appointments. This used to work before upgrading to the Q2 controls.
public
class
RepairBoardDragDropBehavior : ScheduleViewDragDropBehavior
{
public
override
void
Drop(DragDropState state)
{
bool
hasErrors =
false
;
foreach
(IAppointment a
in
state.DraggedAppointments)
{
PersonResource personResource = state.DestinationSlots.First().Resources[0]
as
PersonResource;
string
personId = personResource.PersonId;
DateTime slotStart = state.DestinationSlots.First().Start;
//The next line now fails
DataView dv = (a
as
MetrixTaskAppointment).ResultListViewSource
as
DataView;
}
if
(hasErrors ==
false
)
base
.Drop(state);
}
}
0
Hi Rod,
You should also override ConvertDraggedData method in ScheduleViewDragDropBehavior in order to return the custom appointments. I've attached an example project which demonstrates drag and drop between RadScheduleView and ListView. Please note that you should download the latest internal build (2011.2.725) which contains a fix of the drag and drop functionality and run the project with it.
Hope this helps.
Best wishes,
Yana
the Telerik team
You should also override ConvertDraggedData method in ScheduleViewDragDropBehavior in order to return the custom appointments. I've attached an example project which demonstrates drag and drop between RadScheduleView and ListView. Please note that you should download the latest internal build (2011.2.725) which contains a fix of the drag and drop functionality and run the project with it.
Hope this helps.
Best wishes,
Yana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0

Rod Yager
Top achievements
Rank 1
answered on 01 Aug 2011, 04:04 PM
Thanks for the example, but is there no way to convert my list DataRowView into my custom appointment object in the DragQuery handler? My list doesn't and won't contain my custom appointment object. They must be converted when dragging. As you can see in my example, this was an ObservableCollection that was added to the payload. Can you provide an example using the code that I have?
FYI, I could not get your example to work at all. The DataObject always came back null.
Also, not sure if this matters, but I have the following properites set in the App.xaml.cs. I have other functionality that requires drag/drop from the desktop to a listview. This all used to work before the latest upgrade.
FYI, I could not get your example to work at all. The DataObject always came back null.
Also, not sure if this matters, but I have the following properites set in the App.xaml.cs. I have other functionality that requires drag/drop from the desktop to a listview. This all used to work before the latest upgrade.
RadDragAndDropManager.ExecutionMode = DragExecutionMode.Legacy;
RadDragAndDropManager.EnableNativeDrag =
true
;
Thanks,
Rod
0

Michelle
Top achievements
Rank 1
answered on 01 Aug 2011, 08:20 PM
It looks like the Internal build 2011.2.275 has been taken down from the download site. When will it be available again?
Thank you,Michelle
Thank you,Michelle
0
Hello,
The new internal build (2011.2.0801) is already uploaded, you can download it from your account.
There are some changes in RadDragAndDropManager and DragDropBehavior of the ScheduleView, that's why your current code is not supposed to work. RadScheduleView should take care of the items which are dropped into it - that is why the appointments are converted in its DragDropBehavior ConvertDraggedData method.
Please remove the settings of RadDragAndDropManager in App.xaml.cs and try the project again.
Kind regards,
Yana
the Telerik team
The new internal build (2011.2.0801) is already uploaded, you can download it from your account.
There are some changes in RadDragAndDropManager and DragDropBehavior of the ScheduleView, that's why your current code is not supposed to work. RadScheduleView should take care of the items which are dropped into it - that is why the appointments are converted in its DragDropBehavior ConvertDraggedData method.
Please remove the settings of RadDragAndDropManager in App.xaml.cs and try the project again.
Kind regards,
Yana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0

Rod Yager
Top achievements
Rank 1
answered on 03 Aug 2011, 02:45 PM
OK, I finally got it working again. Thanks! The key was to add the following property on my ListViewItem (won't work without it)...
And I removed the following lines from the app.xaml.cs...
I also verified that my dragging of external desktop files into listviews still works without having to set the EnableNativeDrag property. So far so good.
When will the these fixes be published as an official release? We have a software code release coming up in a month and I would like this fix in a formal release if possible.
Thanks for you help!
<
Setter
Property
=
"telerik:DragDropManager.AllowCapturedDrag"
Value
=
"True"
/>
And I removed the following lines from the app.xaml.cs...
RadDragAndDropManager.ExecutionMode = DragExecutionMode.Legacy;
RadDragAndDropManager.EnableNativeDrag =
true
;
I also verified that my dragging of external desktop files into listviews still works without having to set the EnableNativeDrag property. So far so good.
When will the these fixes be published as an official release? We have a software code release coming up in a month and I would like this fix in a formal release if possible.
Thanks for you help!
0
Hi Rod,
I'm glad that the drag and drop is already working.
The next official release (Q2 SP1) is expected in mid-September.
Regards,
Yana
the Telerik team
I'm glad that the drag and drop is already working.
The next official release (Q2 SP1) is expected in mid-September.
Regards,
Yana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>