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

GanttControl does not work in a Data Template

Hi,

I need to do some customisation in a GanttControl. So I create the DataTemplate

1) I get an reference error for Start & EndTime property
Cannot reference the static member 'ActualEndTimeProperty' on the type 'GanttControl' as it is not accessible

Cannot reference the static member 'ActualStartTimeProperty' on the type 'GanttControl' as it is not accessible

OK. I removed this 2 references. 

But I get anyway following error: Object reference not set to an instance of an object. [...]MainWindow.xaml

My XAML Code
        <sync:GanttControl x:Name="Gantt" 
                            StartTime="9/10/2017"
                            EndTime="9/16/2017"
                           Grid.Row="1" 
                            VisualStyle="Blend" 
                            Template="{DynamicResource GanttControlControlTemplate1}"
                          
                           >
        </sync:GanttControl>

My Template
<ControlTemplate x:Key="GanttControlControlTemplate1" 
                     TargetType="{x:Type syncfusion:GanttControl}">
....
/>

What did I wrong?

Regards,

Louis


3 Replies

VR Vignesh Ramesh Syncfusion Team September 18, 2017 12:19 PM UTC

Hi Louis, 
 
Thanks for contacting Syncfusion Support. 
 
We have analyzed your query, StartTime and EndTime properties bindings are not needed in the GanttControl’s template. We will remove it from our source in our upcoming release.  Please find the template customization demo sample from below link. 
  
  
  
Regards, 
Vignesh R. 



LO Louis September 25, 2017 08:02 PM UTC

Hi,

thank for the template

Regard,

Louis



VR Vignesh Ramesh Syncfusion Team September 26, 2017 12:44 PM UTC

Hi Louis, 
  
Thanks for the update. Please get back to us if you need any other assistance. 
  
Regards, 
Vignesh R. 


Loader.
Up arrow icon