This is a migrated thread and some comments may be shown as answers.

Set a Catagory with drag/drop databound radscheduleview

1 Answer 46 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 24 Apr 2017, 12:33 PM

Using the online examples I've created a very basic WPF app with a radscheduleview and radlistbox.  The two controls are bound to an sql database using entity framework though a the viewmodel (just like the WPF_CS/WithDB.csproj demo project).

 

The radlistbox is bound a Catagories source, and when the user drags an item from the radlistbox to the radscheduleview it creates a new appointment using an overridden ConvertDraggedData().  However, I want to set the new appointment to the category that is dragged over from the radListBox.  It seems like no matter what I try the category is always unassigned when the new appointment shows up in the control.

Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 27 Apr 2017, 08:51 AM
Hello Chris,

If you assign an instance of Category that is present in the CategorySource of RadScheduleView - it should be applied as expected. If you are creating new instance - make sure the Name matches a category in the CategorySource of RadSchedule. For example this will match the default red category of the control:

var category = new Category("Red Category", Brushes.Red);

Hope this helps. If you still face issues - I would like to ask you to share a sample project that demonstrates the drag drop implementation (with local source), so we can check it on our side and provide you with a solution.

Regards,
Kalin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ScheduleView
Asked by
Chris
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or