Hi everyone,
We have special requirements to enable multiple row selection on Gantt. Idea is that we select a few tasks and propagate information further into directives and enable some sort of bulk change.
Is it possible to achieve this and how?
Thanks
4 Answers, 1 is accepted
Selection of multiple tasks (rows) in the Gantt currently is not implemented and is not achievable through configuration or the widget's API. This functionality has been suggested before, see this feature request in our Feedback Portal. Unfortunately, it has not received a lot of support from the community so far, so we would suggest voting for it.
Regards,
Ivan Danchev
Progress Telerik
Hi Ivan,
thank you for your response. I am aware that there is no solution out of the box to do this kind of selection (I tried everything I could remember before posting :) ), but is there any way we can achieve this programatically? I understand that right side of the gantt is based on treelist, so I though there may be some workaround to do it?
Thanks and regards,
Vedad
While clicking tasks does not allow multiple selection and we are not aware of a plausible workaround, programmatically you can use the API to select multiple tasks, see this dojo for example.
Regards,
Ivan Danchev
Progress Telerik
Thanks Ivan, I will try to figure out something based on your suggestion and see if its usable.
I will let you know of results.
Thanks and regards,
Vedad
Hi Ivan,
after dodging this for 3 years, it came up on priority list again. :)
I know even this current dojo cant work anymore because of gantt list changes in 2021. Is there any way we can try to offer multiselection and drag'n'drop (i need to change parent for x selected tasks for example).
Thank you
Hi Vedad,
Starting with the Kendo UI 2020 R3 release the treelist in Gantt was replaced by the TreeList component.
- https://www.telerik.com/support/whats-new/kendo-ui/release-history/kendo-ui-r3-2020
The TreeList provides an option for selecting multiple rows:
selectable: "multiple, row",
Here is a Dojo example where multiple tasks can be selected in the TreeList part of the Gantt widget.
Regards,
Neli
Hi Neli,
thank you for your answer. I completely missed this.
One more question, what I have to do in gantt when I do drag and drop to change hierarchy because save event still receives only last selected task. (I tried on a plain tree list as well). Is this handled somehow in gantt/treelist or I still have to implement custom logic? If yes, do you have any recommendations?
Thanks again.
Regards,
Vedad
Hi Vedad,
When tasks are reordered in the save event handler you could check the e.values as it returns the fields that are being updated. For example in the Dojo linked here, the e.values contains the parentId and the orderId of the moved task.
I hope this helps.
Regards,
Neli
Hi Neli,
thank you for your answer. I am aware of usage of save event handler, but trick is that if we allow multiselection, and I try to change hierarchy (say move two rows from one parent to another), save event triggers only for last selected, and selection of rest is ignored.
I am looking for the way to do multiple rows operation in one action instead of doing it one by one. For example I want to select 5 rows from different parents and move (group) them in one parent.
I have some ideas but all of these are basically repeated simulation of single actions which may not be optimal.
Thank you and regards,
Vedad
Hi Vedad,
I am afraid that currently multiple tasks can be selected, but can not be dragged for reordering. Тhe Kendo UI TreeList (nested in the Gantt) multirow selection overlaps with the triggering of the draggable. Both events are triggered on mouseDown, with the selection of the drag taking precedence.
If it is suitable for your scenario you could try to implement custom drag and drop functionality.
- https://docs.telerik.com/kendo-ui/controls/interactivity/draganddrop/overview
- https://docs.telerik.com/kendo-ui/api/javascript/ui/draggable
Regards,
Neli