Recurring tasks on same line and with different colors

4 posts, 0 answers
  1. Nicolo
    Nicolo avatar
    3 posts
    Member since:
    Dec 2012

    Posted 26 Jan Link to this post

    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.

  2. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 29 Jan Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Nicolo
    Nicolo avatar
    3 posts
    Member since:
    Dec 2012

    Posted 31 Jan in reply to Nasko Link to this post

    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
  5. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 03 Feb Link to this post

    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
Back to Top