Hello I'm working with ScheduleView dragging from my ListBox to the ScheduleView I followed the documentation and it works okay.
Now I needed to extend the default class Appointment with my Custom class called CustomVideoAppointment
public class CustomVideoAppoiment:Appointment
{
public string Name { get; set; }
public string Path { get; set; }
public TimeSpan Duration { get; set; }
public bool IsCloud { get; set; }
}
Actually it works just changing the types of my Behavior ScheduleViewCustomDragAndDropBehavior
public override IEnumerable<IOccurrence> ConvertDraggedData(object data)
{
if (Telerik.Windows.DragDrop.Behaviors.DataObjectHelper.GetDataPresent(data, typeof(VideoInfo), false))
{
var videos = Telerik.Windows.DragDrop.Behaviors.DataObjectHelper.GetData(data, typeof(VideoInfo), true) as IEnumerable;
if (videos != null)
{
var item = videos.OfType<VideoInfo>().FirstOrDefault();
if (item != null)
{
var newItem = new CustomVideoAppoiment()
{
Subject = item.Name,
Start = DateTime.Now,
End = DateTime.Now.Add(item.Duration),
Path = item.Path,
Name = item.Name,
IsCloud = item.IsCloud
};
return new List<IOccurrence>() { newItem };
}
}
}
return base.ConvertDraggedData(data);
Now when I need to check all the dragged items I see all my custom properties are always null.
I attached two images showing the problem. I think is a bug of the control.