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

Changing layout milestone carets etc

2 Answers 105 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Victor
Top achievements
Rank 2
Victor asked on 15 Oct 2016, 09:54 AM

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 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 17 Oct 2016, 09:11 AM
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.
0
Victor
Top achievements
Rank 2
answered on 24 Oct 2016, 12:51 PM
Thanks Hristo. This will get me forward
Tags
GanttView
Asked by
Victor
Top achievements
Rank 2
Answers by
Hristo
Telerik team
Victor
Top achievements
Rank 2
Share this question
or