Using the following class to manage data conversion between a scheduleview and listbox:
using Telerik.Windows.Controls.ScheduleView; using Telerik.Windows.DragDrop.Behaviors; namespace DragDrop { public class AppointmentConverter : DataConverter { /// <summary> /// Returns a list of all formats that the data in this data object can be converted to. /// </summary> public override string[] GetConvertToFormats() { string assemblyName = typeof(Appointment).AssemblyQualifiedName; return new string[] { assemblyName }; } /// <summary> /// Retrieves a data object in a specified format; the data format is specified by a string. /// </summary> public override object ConvertTo(object data, string format) { if (DataObjectHelper.GetDataPresent(data, typeof(ScheduleViewDragDropPayload), false)) { ScheduleViewDragDropPayload payload = (ScheduleViewDragDropPayload)DataObjectHelper.GetData(data, typeof(ScheduleViewDragDropPayload), false); if (payload != null) { return payload.DraggedAppointments; } } return null; } } }
I cannot drag a CustomAppointment (as coded in the Telerik Demo)
back to a list box from a schedule view. No exception or error,
it just simply doesn't let me (cursor icon changes to a 'not
permitted' icon).