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

Facing Issues while integrating GanttControl code into my main project?

Thread ID:





141469 Dec 13,2018 07:01 AM UTC Dec 13,2018 10:53 AM UTC WPF 1
Tags: GanttControl
Sharath Gangadhar
Asked On December 13, 2018 07:01 AM UTC

Hi Team,

Please find attached zip file, 

I'm facing Issues while integrating GanttControl code in my main project-

My App throwing below exception 

InitialSetupBehavior.cs file,

System.NullReferenceException: 'Object reference not set to an instance of an object.'

Syncfusion.Windows.Controls.Gantt.GanttControl.GanttGrid.get returned null.

For more information please find attached zip sample project.


Attachment: WpfAppCamboApp_88d645d5.zip

Muneesh Kumar G [Syncfusion]
Replied On December 13, 2018 10:53 AM UTC

Hi Sharath, 
Greetings from Syncfusion. We have analyzed the reported problem with your sample and we were able to reproduce the reported issue at our end. We would like to inform you that while TabControl loading, it loads all controls (placed in all tabs) available in it, even that is not in the view.  
Same as GanttControl (in second Tab) gets loaded without initializing its inner element. So that we got NRE while loading the TabControl. To overcome this NRE issue, we have added null check before the inner element (GantttGrid) accessing in GanttControl loaded event. Please find the code snippet as below. 
Code snippet : 
void AssociatedObject_Loaded(object sender, RoutedEventArgs e) 
    if (this.AssociatedObject.GanttGrid != null) 
        this.AssociatedObject.GanttGrid.UpdateMode = UpdateMode.PropertyChanged; 
        // Remove all the columns 
        GridTreeColumn column = new GridTreeColumn { MappingName = "Range", HeaderText = "Range", Width = 100 }; 
        // adding the custom columns to GanttGrid(Table) 
NOTE: Already we have resolved this issue and updated the sample in forum 141444. Please download the solution sample from there. 
Hope it helps.  
Muneesh Kumar G. 


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