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

Managing tasks in the left part of the Gantt.

3 Answers 106 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Iron
Dmitry asked on 10 Apr 2015, 06:04 PM

Hello,
I want to manage events in the left (table) part of the Gantt. How can I do the following:

1) Disable drag&drop (moving to new parent or to new position) tasks in the left part? Should I remove some piece of code to disable such behaviour or manipulation with some attributes should help?

2) I want to color tasks in different colors (background and foreground). For instance one part of tasks should be green, other part should be red, another part should be yellow in the left part of the Gantt. Is it possible? 

 

3 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 13 Apr 2015, 07:51 AM
Hi,

You can disable the reorder functionality by adding the following code after the widget initialization:
gantt.list._reorderDraggable.destroy();

Here's a sample demonstrating this:
http://dojo.telerik.com/IdoNo/2

As for colowing the different cells, you can use CSS. For instance:
.k-treelist .k-grid-content table td:first-child{
    background-color: yellow;
}
.k-treelist .k-grid-content table td:nth-child(2){
    background-color: green;
}

And here's the sample for that as well:
http://dojo.telerik.com/IdoNo

Regards,
Bozhidar
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Dmitry
Top achievements
Rank 1
Iron
answered on 13 Apr 2015, 08:32 AM

Hello,

Destroying _reorderDraggable was helpful. Thank you.

Regarding coloring tasks. I want to color tasks in rows in the left Gantt part. I do not want to color columns.

Color of task depends on some task properties. Is there any way to color tasks in the left Gantt part using java-script, like in "dataBound" event?

0
Bozhidar
Telerik team
answered on 13 Apr 2015, 08:43 AM
Hi,

Thank you for clarifying. Here's an updated sample, where the tasks are colored depending on their status:
http://dojo.telerik.com/ADaB/7

Regards,
Bozhidar
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Gantt
Asked by
Dmitry
Top achievements
Rank 1
Iron
Answers by
Bozhidar
Telerik team
Dmitry
Top achievements
Rank 1
Iron
Share this question
or