Completed
Last Updated: 11 Oct 2022 10:54 by ADMIN
Release 3.6.0 (14 Sep 2022) (R3 2022)
Grant
Created on: 05 Mar 2020 13:59
Category: Scheduler
Type: Feature Request
45
Drag & Drop Events
I would like to be able to drag and drop items from a list of custom items into the calendar and create an appointment out of it.
17 comments
ADMIN
Nadezhda Tacheva
Posted on: 11 Oct 2022 10:54

Hi Robert,

Thank you for providing additional details on the use case!

Generally speaking, as by design of the Scheduler component drag and drop of the appointments is treated as an update operation, the user is not able to drag them at all unless AllowUpdate is enabled. In this case, the OnUpdate event will automatically be raised, so one can handle the user action to update the time of the appointment in regards to where the user dropped it.

This, however, will not prevent you from using custom dialogs for creating and editing of the appointments. If you are experiencing any difficulties with the implementation, you may open a dedicated support ticket on the matter, so we can assist.

Regards,
Nadezhda Tacheva
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Robert C
Posted on: 04 Oct 2022 18:03
I see, makes sense now. However, I can't use that. My events are completely custom and I cannot enable the built in CUD functionality, because I have my own dialogs for creating events and so on. I really just want a way to drag an drop without the OnUpdate functionality. Is that in any way planned for a future release?
ADMIN
Nadezhda Tacheva
Posted on: 04 Oct 2022 08:20

Hi Robert,

Thank you for the clarification!

The current request targets drag and drop events between various components. In the context of the Scheduler component only, such drag and drop action is treated as an appointment update since you are essentially changing the start and end time of the dragged appointment.

That said, the event that will be fired when you drop the appointment is OnUpdate.

Regards,
Nadezhda Tacheva
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Robert C
Posted on: 27 Sep 2022 12:58
Sorry, I should have been more specific. I am talking about drop events within the scheduler component itself. As in, in the month view, when the user drags an event to another day, there should be an OnDrop on the scheduler component that gets called. 
ADMIN
Marin Bratanov
Posted on: 27 Sep 2022 01:11

Hi Robert,

The source component drag-drop events offer the target component where such an integration exists. So, for example, if you want to drop a row from a grid on the scheduler, see these examples: https://docs.telerik.com/blazor-ui/components/grid/row-drag-drop#drag-and-drop-between-grid-treelist-treeview-and-scheduler. The scheduler, in particular, also has a new method GetTimeSlotFromDropIndex().

Regards,
Marin Bratanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Robert C
Posted on: 22 Sep 2022 22:19
3.6.0 just dropped, but no sign of drag and drop. How do we actually use it? I was expecting some OnDrop even or something along those lines.
Neil
Posted on: 14 Apr 2022 19:19
This too would be a really good feature, create a wrapper for an item, (so we can drag any ‘div’ not just a list item but something you can style with css) on to a scheduler cell and trigger an event we can hook into like the onDragEnd or onCreate event and then we can either pop a custom modal to gather more info or auto create a basic appointment - but really do need to be able to hook in and pop that modal or pop my own modal for extra custom fields, also be able to drag a cell off the scheduler and be able to hit another drag target such as a ‘trash can’ to delete an event, again be able to hook into a onDragEnd argument that allows us to pop a modal to confirm delete or some other custom modal
Peter
Posted on: 21 Feb 2022 14:32
Adding my support for this feature, I have a real use case for it!
ADMIN
Marin Bratanov
Posted on: 06 Jan 2022 11:45

Hi Kenny,

The best way to know when something is done is to click the Follow button - this will subscribe you for status update emails. When we know the release that will have this, we will add this info to the page and you will get an email.

Regards,
Marin Bratanov
Progress Telerik

Learn about the important changes coming in UI for Blazor 3.0 in January 2022!
Kenny
Posted on: 06 Jan 2022 10:23

Has any progress been made toward this feature?

Grids can do drag and drop between them these days, I'm wondering if anything has changed in regards to the scheduler receiving drop events.

ADMIN
Marin Bratanov
Posted on: 21 Nov 2021 14:13

Hi Neil,

My post explains a way I imagine the feature can work if we implement it, but it is not implemented yet. I must also note that this is just an idea from a while back, and the actual implementation may differ as it needs to step on a thorough research first, which I have not done.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Neil
Posted on: 16 Nov 2021 20:43

@MartinBratanov does the drop event you mentioned in the post from 6.3.2020 exist? I can't find any documentation on it?

"The scheduler fires an OnDrop event that gives you an appointment in the event arguments"

 

cheers

Neil

Mark
Posted on: 21 Jul 2021 12:57
Has anyone found a way to do this as of now? We'd need something similiar to the asp.net solution, where I could drag an item from a list into the scheduler, who would then fire the OnCreate event.
Gerard
Posted on: 08 Nov 2020 21:52
currently  we use a scheduler in an asp.net project which uses a grid where we drag a row into a schedule cell which which grabs the several row values  for processing and setting such as getting the customer and task a standard time and equipment allocation for the task (if known) and then sets up the entry in the various schedules / gantt  charts we also want to use utc as a base time time because some items or tasks can go over 2 or more time zones 
ADMIN
Marin Bratanov
Posted on: 06 Mar 2020 09:20

Hi Wayne,

Thank you for your feedback.

Dragging is still something Blazor can't really do, but I imagine that something like this might be possible without waiting for the framework:

  1. You handle the dragstart event on your elements and populate a field in the ViewModel with the data you will need. This will also let you handle the dragged item appearance, image, and so on. For exapmle, and image in a grid cell template can give you the ability to attach the dragstart handler, and the row data.
  2. The scheduler fires an OnDrop event that gives you an appointment in the event arguments. Ideally, it will have a start and end pre-populated with the time slot/area over which the drop happened (hopefully this will be possible - in a Month View that would be possible by handling individual drop events for each month cell - but for other cases maybe we will need a way to let the scheduler know which element is being dragged, maybe through an instance method). In any case, you should get an appointment. You now have this appointment and your data so you can populate more fields in it (e.g., title, some metadata tweak durations).
  3. If you don't cancel the event the scheduler takes that appointment (with your additions) and adds it to its rendering. This would fire the OnCreate event where you can store that appointment in the data source.

Perhaps (maybe in v2), some built-in integration may be available between a scheduler and a grid where the dragging operation starts and the scheduler drop event will provide the grid row model in its event arguments for you. The key thing here is - how would that be exposed for configuration? How would the draggable element be defined for the grid.

On getting scheduler events for a given time frame - we are considering creating a method for this. Maybe it will be tied to recurring appointments, maybe it will be implemented separately, it's too early to tell at this stage.

Would that make sense?

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
Grant
Posted on: 05 Mar 2020 23:56

Hi Marin,

 

For my use case it would be create to have the scheduler bound to type T. That way when we drag an object of type T from a Grid and drop it onto a day, the even can return an object of type SchedulerTaskAdded<T> that has attributes related to the date/day the type was dropped onto and return a copy of that object in the even for the controller to do the neccessary plumbing.

Of course this is just a quick mind-map of how I think it would work and that all seems pretty trivial. The real question is, how does the control know what month/day the object was dropped into? I am probably still thinking from the Scheduler Component, but if I switch to a DroppableCalendarComponent then this makes sense. Display a calendar with days that we can adjust width/height to and capture the drop even on the div for those days.

It would be great if you could assign a custom function to determine "how full" the day is as it could be hours, maximum resources, stock availability etc..etc..

ADMIN
Marin Bratanov
Posted on: 05 Mar 2020 14:05

To anyone needing this - we'd appreciate your feedback on how you would expect this to be exposed (for example, how should the scheduler receive your dragged data so an appointment can be created).

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor