Changing layout milestone carets etc

3 posts, 0 answers
  1. Victor
    Victor avatar
    11 posts
    Member since:
    Aug 2016

    Posted 15 Oct Link to this post

    Hi,

    In the demo's, there is a project called "Ganttview Custom Painting" and it works fine.

    I have a question regaring the layout of the standard objects like milestone caret or timeline-tast (rollup).

    How can I change them (or not draw them at all)?

    As the start and the end of a task in the graphical time line I would like to use different icons (newsituation.png)

     

    Thanks

    Victor

    Amsterdam

     

  2. Hristo Merdjanov
    Admin
    Hristo Merdjanov avatar
    711 posts

    Posted 17 Oct Link to this post

    Hello Victor,

    Thank you for writing.

    You can access each of the elements in a formatting event and if needed sets its Visibility property to Collapsed
    private void radGanttView1_GraphicalViewItemFormatting(object sender, GanttViewGraphicalViewItemFormattingEventArgs e)
    {
        if (e.ItemElement is GanttViewMilestoneItemElement)
        {
            e.ItemElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
        }
        else
        {
            e.ItemElement.ResetValue(LightVisualElement.VisibilityProperty, Telerik.WinControls.ValueResetFlags.Local);
        }
    }

    Considering your other question, you can follow the suggested in the demo project approach. In the ItemPaint event, you can draw different images depending on the data item. The following section provides additional information on how the items can be customized: http://docs.telerik.com/devtools/winforms/ganttview/formatting/textview-item-formatting.

    I hope this helps. Please let me know if you need further questions.

    Regards,
    Hristo Merdjanov
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms. For more information check out this blog post and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Victor
    Victor avatar
    11 posts
    Member since:
    Aug 2016

    Posted 24 Oct in reply to Hristo Merdjanov Link to this post

    Thanks Hristo. This will get me forward
Back to Top