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

Recurring tasks on same line and with different colors

3 Answers 233 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Nicolo
Top achievements
Rank 1
Nicolo asked on 27 Jan 2016, 04:15 AM

Basically i need to combine the ability to display multiple events or GanttTasks on a single line and at the same time to set different colors depending on task-'type'. The SDK Samples contain both options (SameRowRecurringTask, TasksWithDifferentColors).

I encountered following issues trying to combine the abilities:

  1. I have implemented different colors, but when i try to combine it with the recurrence on the same line, the coloring of the single tasks isn't displayed anymore.
  2. The SDK sample adds the Recurrences this way Recurrences = { recurrenceTask1, recurrenceTask2, recurrenceTask3 }. But i need to compose them at runtime like collect them within a foreach and then define the recurrences like Recurrences = myTaskList.

The attached image shows what i need.

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 29 Jan 2016, 12:45 PM
Hi Nicolo,

Please, check the attached sample that demonstrates how to apply the desired color for each task of the recurrence. Basically, the Background of the custom TimeLineRecurrenceContainer should be bound to the one set for each Task. 

As for your question concerning the setting the recurrence tasks during run-time you should not have any concerns - the sample also demonstrates how the task could be loaded during run-time and to be visualized as expected.

We hope this will help you.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Nicolo
Top achievements
Rank 1
answered on 31 Jan 2016, 01:27 PM

Hello Nasko

Thanks a lot for the sample you have prepared. It's exactly what i needed.

There is an interesting option: setting at the same time the Recurrences and also adding the Children to the recurrenceSeriesTask. It provides both views: Task collpsed = recurrences on single row, Task expanded = default view with each child task within a row. It then looks like the attached image.

Kind regards
0
Nasko
Telerik team
answered on 03 Feb 2016, 07:43 AM
Hello Nicolo,

The observed by you appearance of the Tasks is an expected one when the Children collection is used - this is the built-in collection of the Recurrence that is used for visualizing the Tasks in the GanttView. While the Recurrences collection is added to our custom "RecurrenceTask" that inherits the default GanttTask and it is used for visualizing the Tasks in the same row. So, the appearance you are observing when the Children collection is used is the default one of RadGanttView.

If you have any additional questions or concerns regarding Telerik controls, please do not hesitate to contact us.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GanttView
Asked by
Nicolo
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Nicolo
Top achievements
Rank 1
Share this question
or