We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to disable Modification of Gantt Bar from user?

Hello Team,

Is there any way to disable Modification of Gantt Bar value from user?

Thanks,
Sharath

1 Reply

MK Muneesh Kumar G Syncfusion Team January 3, 2019 11:32 AM UTC

Hi Sharath, 
 
Greetings from Syncfusion.  
 
You can achieve this by disabling the thumbs of Gantt Node in its Style as per the below code snippet. 
 
Code Snippet: 
<Grid.Resources> 
    <!--To change the appearence of Gantt Node--> 
    <Style x:Key="TaskNode" TargetType="{x:Type chart:GanttNode}"> 
        <Setter Property="Template"> 
 
   <Thumb x:Name="PART_DragDropThumb" 
       Grid.Column="0" 
       Grid.ColumnSpan="3" 
       Cursor="SizeAll" 
       IsEnabled="False"> 
    <Thumb.Template> 
        <ControlTemplate> 
            <Border Background="Transparent" /> 
        </ControlTemplate> 
    </Thumb.Template> 
   </Thumb> 
 
         <Thumb x:Name="PART_ProgressThumb" 
                HorizontalAlignment="Right" 
                Cursor="SizeWE" 
                IsEnabled="False"> 
             <Thumb.Template> 
                 <ControlTemplate> 
                     <Border Background="Transparent" BorderBrush="Transparent"> 
                         <Rectangle Width="5" 
                                    Height="2" 
                                    Fill="Transparent" /> 
                     </Border> 
                 </ControlTemplate> 
             </Thumb.Template> 
         </Thumb> 
     </Grid> 
</Border> 
 
<Thumb x:Name="PART_RightThumb" 
        Grid.Column="2" 
        HorizontalAlignment="Right" 
        Cursor="ScrollE" 
        IsEnabled="False"> 
     <Thumb.Template> 
         <ControlTemplate> 
             <Border Width="4" 
                     Height="20" 
                     Background="Transparent" 
                     BorderBrush="Transparent" 
                     BorderThickness="0" /> 
         </ControlTemplate> 
     </Thumb.Template> 
</Thumb> 
 
<Thumb x:Name="PART_LeftThumb" 
        Grid.Column="0" 
        HorizontalAlignment="Left" 
        Cursor="ScrollW" 
        IsEnabled="False"> 
     <Thumb.Template> 
         <ControlTemplate> 
             <Border Width="4" 
                     Height="20" 
                     Background="Transparent" 
                     BorderBrush="Transparent" 
                     BorderThickness="0" /> 
         </ControlTemplate> 
     </Thumb.Template> 
</Thumb> 
 
      </Setter> 
  </Style> 
 
 
Please let us know if you have any other queries. 
 
Regards, 
Muneesh Kumar G. 


Loader.
Live Chat Icon For mobile
Up arrow icon