Modify style of gantt schedule

Hi,

is it possible to set dinamycally a different style to the gantt schedule?

For example  keep horizontal line and discard vertical and viceversa.



Best regards
Gian Piero Truccolo



3 Replies 1 reply marked as answer

SS Sridevi Sivakumar Syncfusion Team May 4, 2021 10:37 AM UTC

Hi Gian Piero Truccolo,

Greetings from Syncfusion.

Query : Is it possible to set dynamically a different style to the Gantt schedule? For example, keep the horizontal lines and discard vertical and vice versa.
Yes, we can achieve your requirement by modifying the GanttScheduleCell border thickness with style, as shown in the code snippet below.

To hide the  horizontal line:
 
   <sync:GanttControl.Resources> 
                <Style TargetType="{x:Type schedule:GanttScheduleCell}"> 
                    <Setter Property="Template"> 
                        <Setter.Value> 
                            <ControlTemplate TargetType="{x:Type schedule:GanttScheduleCell}"> 
                                <Border BorderThickness="1,0,0,0" 
                            BorderBrush="Black" > 
... 
  
            </sync:GanttControl.Resources> 
 

To hide the vertical line: 
   <sync:GanttControl.Resources> 
                <Style TargetType="{x:Type schedule:GanttScheduleCell}"> 
                    <Setter Property="Template"> 
                        <Setter.Value> 
                            <ControlTemplate TargetType="{x:Type schedule:GanttScheduleCell}"> 
                                <Border BorderThickness="0,1,0,0" 
                            BorderBrush="Black" > 
... 
  
            </sync:GanttControl.Resources> 
 

Screenshot: 


Please have a sample from the below link
https://www.syncfusion.com/downloads/support/directtrac/general/ze/GanttSample1265795661

Let us know if you need any further assistance.

Regards,
Sridevi S.
 


Marked as answer

GI Gian May 4, 2021 10:45 AM UTC

Hi,

thanks.

Is it possible also apply different style for each GanttScheduleRowInfo?

Best regards
Gian Piero Truccolo


SS Sridevi Sivakumar Syncfusion Team May 5, 2021 10:02 AM UTC

Hi Gian Piero Truccolo,

Query: Is it possible also apply different style for each GanttScheduleRowInfo?
We don’t have support to set the different style for each Gantt schedule row.

Let us know if you need any further assistance.

Regards,
Sridevi S.  
 


Loader.
Up arrow icon