TaskBoard Drag-and-Drop

1 Answer 307 Views
TaskBoard
Scott
Top achievements
Rank 1
Scott asked on 01 Jul 2021, 07:25 PM

Greetings,

Is it possible to drag items from another control such as a list and drop them on the TaskBoard similar to how you can drag items from the grid control and drop them on a calendar? Very interested in this functionality.

Thanks,

Scott

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 06 Jul 2021, 06:30 AM

Hi Scott,

The Telerik UI TaskBoard for ASP.NET Core internally uses the Sortable widget. Therefore, all that is needed to integrate the TaskBoard with another widget is to initialize a new Sortable widget. In order to connect them, you should set a specific class to the element from which you are initializing the Sortable. Namely, it should be in this format "<<TaskBoardName>>-kendosortable".

I have prepared a sample project to demonstrate this. The TaskBoard is integrated with a plain div HTML element:

https://dojo.telerik.com/otEsUVod

Let me know if additional information is required.

 

Regards,
Tsvetomir
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/.

Scott
Top achievements
Rank 1
commented on 06 Jul 2021, 07:03 PM

Thank you so much for the information, I will give that a go and see if I can get it working.

-Scott
Tsvetomir
Telerik team
commented on 07 Jul 2021, 05:54 AM

Hi, Scott, the implementation for ASP.NET Core will remain the same and you should be able to implement it accordingly. In case you encounter any issues along the way, feel free to contact me back.
Scott
Top achievements
Rank 1
commented on 07 Jul 2021, 05:26 PM

Tsvetomir,

Appreciate the help so far but I am still a little stuck. I'd like all of my data to start in the sortable - this will be my queue of tasks - and then get dragged onto the TaskBoard when a project is started. I tried to wire them up and was able to drag them from the sortable to the TaskBoard but the items were being created properly and I could move them around once there were in the TaskBoard. Any chance you could rework this example to do that? What a great set of controls you folks have!

Thank you so much,
Scott
Tsvetomir
Telerik team
commented on 08 Jul 2021, 02:18 PM

Hi Scott, the implementation of the drag and drop does not take into account if another sortable widget (outside of the scope of the TaskBoard) is used. Hence, most probably you are observing a JavaScript error in the console of the browser. This is due to the fact that all items are expected to be present in the data source of the widget.

When the items start in the Sortable widget they are simple HTML elements with no data item associated with them. Hence, you should come up with a custom move command solution that will check if the item is present in the data source. If not, first add it and then modify its properties. At present, the TaskBoard widget tries to modify the properties of a non-existent item.

Here is a link to an article that elaborates further on how the command implementations can be overridden:

https://docs.telerik.com/kendo-ui/api/javascript/ui/taskboard/configuration/cardmenu.command

Tags
TaskBoard
Asked by
Scott
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or