Planned
Last Updated: 14 Apr 2022 19:19 by Neil
Scheduled for 3.6.0
Grant
Created on: 05 Mar 2020 13:59
Category: Scheduler
Type: Feature Request
24
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.
11 comments
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