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

Drag and drop anywhere in Custom slot

3 Answers 66 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Bert
Top achievements
Rank 1
Bert asked on 25 Nov 2015, 02:50 PM

Hi,

For a tool of mine I have the following problem: I have an appointment which I want to drag in any red/green slot. For this I have a custom ScheduleViewDragDropBehavior class, which has the method CanDrop which will check if the DestinationSlots overlaps any of my red/green slots which I access via my ViewModel. I also have a custom DragDropHighlightStyle template, which will show nothing when dragging.

 

Thus, when the user drags the appointment, he only sees his cursor. The purpose would be that the user can drag anywhere in a red/green slot, drop it, and the appointment takes over the start and end time of that slot. But the problem: it depends where the user clicks the appointment and starts dragging. Let's say that an appointment lasts four hours, starts at 01:00, and ends at 05:00:

- If the user clicks the appointment at 01:05, starts dragging and drops it in the slot below at 01:00, the DestinationSlots will be from 12:55 till 04:55

- If the user clicks the appointment at 03:05, starts dragging and drops it in the slot below at 01:00, the DestinationSlots will be from 10:55 till 02:55

- If the user clicks the appointment at 04:55, starts dragging and drops it in the slot below at 01:00, the DestinationSlots will be from 09:02 till 01:05

When I actually want my DestinationSlots to start exactly where I drop it on the timeline, and end four hours later.

 

 My possible solutions would be:

- Detect in which custom slot an appointment is dropped. But not possible if I understood correctly?

- Detect on which hour the cursor currently is (hover). I could match this with the value from DestinationSlots. But also not possible?

- Modify each appointment I drag to being one minute long. Thus, it would not matter where the users clicks the appointment to start the drag. But also this I could not get to work. But I think this is the most viable solution.

 

Any help would be appreciated. 

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 27 Nov 2015, 10:36 AM
Hi Bert,

Using the provided description we tried to reproduce the observed by you behavior, however due to the fact that your scenario is a custom one with some modification made by you on the default DragDropBehavior we were not able to reproduce it.

Could you please, try to isolate the issue in a sample project and send it back to us - thus we could be able to continue our investigation and provide you with a prompt solution or some detailed technical instructions how to resolve it?

We are looking forward to hearing from you.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Bert
Top achievements
Rank 1
answered on 27 Nov 2015, 04:00 PM

Hello Nasko,

Thank you for your reply. I have extracted everything you would need into a new project, for which you can find the link below. It would be sufficient for me if you were able to tell me in TelerikScheduleViewControl.Behavior.ScheduleViewDragDropBehavior method CanDrop what the time is corresponding with the current position of the cursor.

Kind regards,

Bert

 https://www.wetransfer.com/downloads/2f964b1fec75ed013f859cb495ea921720151127155652/8f63808888f7f48893bd972bc7ff848420151127155652/8fd431

0
Nasko
Telerik team
answered on 01 Dec 2015, 03:09 PM
Hello Bert,

Thank you for the provided sample project.

Unfortunately, after further investigation the desired by you behavior and functionality could not be achieved with the current implementation of RadScheduleView.

You could log this functionality as a feature request in our Feedback Portal providing a detailed description of the expected and needed behavior. We will review the item with our development team and either will consider it for implementation or decline it.

If you have any additional questions or concerns regarding Telerik controls, please do not hesitate to contact us.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ScheduleView
Asked by
Bert
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Bert
Top achievements
Rank 1
Share this question
or