transverse milestone above tasks in RadGanttView

12 posts, 1 answers
  1. Julien
    Julien avatar
    20 posts
    Member since:
    Oct 2013

    Posted 29 Oct 2014 Link to this post

    Hello everybody,

    I have a client request on a view to display a list of milestones transverse tasks managed by the Ganttview. You can see the request on the attachment (for example "Achèvement des fondations").
    I have no idea of ​​the way to develop this part, do you have any idea of implementation to represent this transverse milestone on the GanttView ? (although graphically it's different, that's important is to see that the milestone is task-independent).

    Thank's for your help
  2. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 31 Oct 2014 Link to this post

    Hello Julien,

    What I can suggest you would be to check the following example from our online demos, which demonstrates how to achieve such an appearance:
    http://demos.telerik.com/silverlight/#GanttView/Deadline

    Please check and let me know if it will help you. If it doesn't I'll ask you to share some more details on the exact requirements, so we can think of another solution if possible.

    Hope this works for you.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Julien
    Julien avatar
    20 posts
    Member since:
    Oct 2013

    Posted 03 Nov 2014 in reply to Kalin Link to this post

    Hello Kalin,

    I saw the deadline functionality on the ganttView, But I feel that we can instantiate only one by ganttview, but in my case I have to show multiple elements, do you think it's possible to display multiple deadline ?

    Thanks,
  5. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 04 Nov 2014 Link to this post

    Hi Julien,

    You should be able to draw as many deadlines as needed. You would need to only use the project deadlines implemented in the demo and modify TimeLineDeadlineBehavior as required. You would need to pass a collection with the milestones to the TimeLineDeadlineBehavior in order to be able to correctly draw all the lines. As for the text above you would need to use the TimeRulerOverdueContainer used in the example to show the title of the milestone there. Please give it a try and let us know if you face any issues during the implementation so we can provide you with further assistance.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Julien
    Julien avatar
    20 posts
    Member since:
    Oct 2013

    Posted 04 Nov 2014 in reply to Kalin Link to this post

    OK to show multiple Deadlines, but it seem not possible to add text associate with the date of deadLine,  anyway I have no idea how ta achieve this (return custom type in GetBackgroundData method of behavior rather than TimeLineDeadlineEventInfo? I try, but I have Not supported item type. Exception)

    thanks for your help
  7. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 07 Nov 2014 Link to this post

    Hi Julien,

    We are preparing a sample project demonstrating the exact approach - I'll get back to you as soon as possible.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. Polya
    Admin
    Polya avatar
    199 posts

    Posted 10 Nov 2014 Link to this post

    Hi Julien,

    As the desired scenario is a bit complex, it took us some time to investigate whether it is possible and prepare a sample project ( please find the project attached ).
    In order to add containers to the TimeRuler part of the RadGanttView we should:
    ​1) Create a custom IEventInfo that contains the relevant information about the new container we want to add. In our case these are the MilestoneMarkerEventInfo ( for the timeline container ) and the TimeRulerMilestoneTickInfo and TimeRulerAlternatingInfo ( for the timeruler container ).

    2) Create the custom containers that we want to add and add styles for them:
        - MilestoneMarkerContainer ( the container added in the timeline area - it represents a red vertical rectangle )
        - TimeRulerMilestoneContainer ( the container added in the time ruler part - it contains a TextBlock with the GanttTask Title )
        - TimeRulerAlternatingContainer ( the other container in the timeruler part that will contains a white rectangle and represents the blank part of the timeruler area)

    3) Create a Custom ContainerSelectors and in the overriden GetContainerType return the corresponding containers based on the received IEventInfos - the CustomTimeLineVisualizationBehavior and the TimeRulerMilestoneBehavior.

    4) Create custom DefaultGanttTimeLineVisualizationBehavior ( CustomTimeLineVisualizationBehavior )  and  DefaultTimeRulerVisualizationBehavior( TimeRulerMilestoneBehavior ) that answer for generating the correct IEventInfos for each GanttTask.

    As the desired scenario is that the vertical lines descent to the Milestone GanttTask and do not continue down we had to create a CustomGanttTask and include a property Order that holds on which row the corresponding GanttTask is located ( see SoftwarePlanning.CalculateOrders method ). We need this property as in the CustomTimeLineVisualizationBehavior we have no information where the HierarchicalItem is positioned - before or after the milestone.
    Note that if reorder of tasks is available in your application - you should also recalculate the Order property each time a reorder is performed.

    Hopefully this clarifies things better and that the proposed solution is suitable for your scenario.

    Regards,
    Polya
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  9. Julien
    Julien avatar
    20 posts
    Member since:
    Oct 2013

    Posted 10 Nov 2014 Link to this post

    Hello Kalin, thanks for the sample, It starts to look like what I want.
    The problem may be difficult to solve is that I don't want these tasks appear as item in ganttView (it should not be that the lines "Scope Complete," "Develop Preliminary Budget", etc. appear) . By extension, the chart milestone on the line would not appear either. Regarding the height of the red line, ideally it would have to go from low to high, but if that is not possible it is not important.

    Do you think it's possible to "Hide" the line with the milestone but keep Red Line and text showing ?

    Thanks,

    Julien
  10. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 12 Nov 2014 Link to this post

    Hello Julien,

    Can you please share a screen shot (modified as needed) that demonstrates what exactly you need to achieve as I'm not completely sure if we understand you correctly. Please confirm if you need to hide all of the milestones and which red lines you want to hide as well? Any other details would be helpful too.

    I'm looking forward to your reply.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  11. Julien
    Julien avatar
    20 posts
    Member since:
    Oct 2013

    Posted 12 Nov 2014 Link to this post

    Hello,

    Please confirm if you need to hide all of the milestones and which red lines you want to hide as well? -> I confirm that all milestone need to be hiding, but Keep the red line associate.
    I attach a modified printscreen with what I want (the line I want hidden is in black, and i extend the red line at bottom). 

    Thanks,

    Julien
  12. Answer
    Polya
    Admin
    Polya avatar
    199 posts

    Posted 13 Nov 2014 Link to this post

    Hello Julien,

    Hiding the milestone GanttTasks from the rows of the RadGanttView can be achieved by filtering the TasksSource so that it does not contain milestone tasks ( or creating a TasksSource with no milestone tasks ).
    We need the milestone GanttTasks only for the custom behaviors - the TimeRulerMilestoneBehavior and the CustomTimeLineVisualizationBehavior - that is why we pass the IEnumerable<GanttTask> milestones in their constructors. We don't need to have these milestone tasks in the TasksSource.

    Also, if the red line indicating the milestone can extend till the end of the RadGanttView we also can remove the CustomGanttTask that holds the Order of its corresponding GanttTask- which simplifies the solution even more.

    I've modified the project and attached it. Hopefully it is suitable for your scenario.

    Regards,
    Polya
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  13. Julien
    Julien avatar
    20 posts
    Member since:
    Oct 2013

    Posted 21 Nov 2014 Link to this post

    It's exactly what I want, Thanks!

    Problem solved

    Julien
Back to Top
UI for WPF is Visual Studio 2017 Ready