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

Drag and Drop with custom appointment from and to listbox

2 Answers 99 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Veteran
Markus asked on 30 Sep 2019, 12:20 PM

Hi Gyus,

we have the following scenario:

UI with a RadListBox and a RadScheduleView
The ListBox contains custom business objects

We want to drag and drop these business objects to the ScheduleView.

So we need the following:

A custom DragSourceBehaviour for the RadListBox (checked and works)
A custom DragDropBehaviour for the ScheduleView (checked and works)
So far so good...

But now the problems starts:

We need a custom appointment that implements the only interface IAppointment.
We don't need any further appointment interface like IExtendedAppointment or IObjectGenerator.
But we can't inherit from the Appointment base class, because we already inherit from our own base class.

If we implement the IAppointment interface, the drop on the schedule view doesn't work!
And unfortunately we don't understand why. And believe me, we have tried many variants.

We know all your samples from the sdk and from the forum (for example: WithDB and the example from 2012)
But all these examples don't just implement the IAppointment interface.

And when is the Drop operation completed?
If you drag and drop only inside the ScheduleView there is as DragAndDropCompleted event. 
But, if you drop from another control, there is no completed event!
We have to write the changed data directly into the database. So we need to know when the drop processes are completed.

Can you please tell me the two drag and drop lifecycles (internal drag and drop as well as drop from another control)?

Thank you very much.
 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 03 Oct 2019, 10:03 AM

Hi Markus,

To avoid any misunderstanding may I ask you to share the IAppointment implementation so I can test it on my side. If you can isolate this behavior in a standalone project, that will be great. Also, you can consider modifying the CustomDragDropBehavior SDK example in our GitHub repository if it will be easier for you.

Regarding the DragDropCompleted event: This event won't be fired on the RadScheduleView when you drop the item from external control, as the drag-drop operation started from another control. However, the DragDropCompleted event of the RadListBox will be called when you drop and item from the RadListBox to the RadScheduleView.

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Markus
Top achievements
Rank 1
Veteran
answered on 14 Oct 2019, 06:41 AM

Hi Dinko,

thank you, for your answer.
We solved it ourselves.
We had our own solution for the drag&drop mechanism.
Now we switched to the Telrik Drag&Drop manager and it works.

Thanks
Markus

Tags
ScheduleView
Asked by
Markus
Top achievements
Rank 1
Veteran
Answers by
Dinko | Tech Support Engineer
Telerik team
Markus
Top achievements
Rank 1
Veteran
Share this question
or