How can i change the following properties in the object "RadGanttView" (check image for color usage)
Height (RED)
Width (BLUE)
1 Answer, 1 is accepted
1
Nadya | Tech Support Engineer
Telerik team
answered on 14 Jun 2024, 10:49 AM
Hello, João,
Thank you for writing.
You can control what time part exactly a certain element represents. This is controlled by the GanttViewElement.GraphicalViewElement.OnePixelTime property. Thus, you can shrink or enlarge the time parts:
this.radGanttView1.GanttViewElement.GraphicalViewElement.OnePixelTime = new TimeSpan(0, 0, 10, 0, 0);
As for increasing the height of GanttViewTimelineItemTopElement I would like to note that this is not an easy task. You may need to create a custom GanttViewTimelineItemElement and override its MeasureOverride method. Keep in mind that RadGanttView has a complex structure, and if you decide to measure and arrange inner elements you may need to arrange the bottom element as well.
The GanttViewTimelineItemElement can be replaced in TimelineItemElementCreating event. I prepared a sample demonstration for your reference. Feel free to modify it according to your needs: