3 Answers, 1 is accepted
0
Hello Rod,
George
the Telerik team
I would suggest you to refer to our online documentation - http://www.telerik.com/help/wpf/raddraganddrop-howto-delayed-dragdrop.html
I hope this suits your needs.
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Rod Yager
Top achievements
Rank 1
answered on 03 Jan 2011, 05:37 PM
I tried this example and it is not working for me. My scheduleview has an AppointmentSource set to an ObservableAppointmentCollection. The Appointment gets added to the scheduleview even when it doesn't get added via the
delayedDragDrop.DropAction
delayedDragDrop.DropAction = () =>
{
taskAppointments.Add(mta);
};
IList selectedItems = delayedDragDrop.DragDropState.Data
as
IList;
foreach
(DataRowView drv
in
selectedItems)
{
ObservableCollection<
object
> resources = delayedDragDrop.DragDropState.DestinationSlots.First().Resources;
if
(resources.Count == 1)
{
mta = delayedDragDrop.Appointment
as
MetrixTaskAppointment;
PersonResource resource = resources[0]
as
PersonResource;
string
personId = resource.PersonId;
DateTime slotStart = delayedDragDrop.DragDropState.DestinationSlots.First().Start;
if
(personId.Length > 0 && mta !=
null
)
{
if
(UpdateTaskAndUnit(personId, mta, slotStart))
{
removeObjects.Add(drv);
delayedDragDrop.DropAction();
}
else
{
The Appointment is still being rendered on the ScheduleView
even though I have not added it to the AppointmentSource
collection.
}
}
}
}
0
Hello Rod,
George
the Telerik team
Could you please give us more detailed information about your scenario? Do you drag and drop appointments only inside the RadScheduleView or you drag them from an external source? If you send us a sample application that reproduces the problem it would be very helpful.
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF