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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Data Range

Thread ID:

Created:

Updated:

Platform:

Replies:

148463 Oct 21,2019 10:33 AM UTC Oct 23,2019 05:35 AM UTC WPF 3
loading
Tags: GanttControl
Sérgio Rodrigues Costa
Asked On October 21, 2019 10:33 AM UTC

How can I define a visible date range for the Gantt control?
If I add a task from 06/03/2019 to 10/08/2019, I´m getting the full 2019 year and 2 months of 2020 on the gantt grid.
Thanks in advance.

Vignesh Ramesh [Syncfusion]
Replied On October 22, 2019 06:40 AM UTC

Hi Sérgio,   
   
Greetings from Syncfusion.   
   
We have analyzed your requirement and we would like to inform you that GanttControl has support to specify the schedule range, by using StartTime and EndTime properties. You can specify the schedule range as per the below code snippet.    
   
[XAML]: 
<!--  Gantt Control Information  --> 
<gantt:GanttControl x:Name="Gantt" 
                    ScheduleType="YearWithMonths" 
                    StartTime="3/6/2019" 
                    EndTime="10/8/2019" 
                    ItemsSource="{Binding TaskDetails}" 
                    VisualStyle="Metro"> 
</gantt:GanttControl> 
   
Also, GanttControl have support to specify the schedule range padding. By using ScheduleRangePadding property you can specify the padding for gantt chart. Please find the code snippet as below   
   
[XAML]: 
<!--  Gantt Control Information  --> 
<gantt:GanttControl x:Name="Gantt" 
                    ScheduleType="YearWithMonths" 
                    ScheduleRangePadding="1" 
                    ItemsSource="{Binding TaskDetails}" 
                    VisualStyle="Metro"> 
</gantt:GanttControl> 
   
NOTE: If bottom schedule unit is Month, 1 month added front and back of the schedule.   
   
Please find the sample from the below link. 

Please let us know if you have any queries.    
   
Regards,   
Vignesh. 


Sérgio Rodrigues Costa
Replied On October 22, 2019 07:35 PM UTC

Thanks a lot!

Rachel A [Syncfusion]
Replied On October 23, 2019 05:35 AM UTC

Hi Sérgio, 
 
Thanks for the response. 
 
Please let us know if you need any further assistance. 
 
Thanks, 
Rachel. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon