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
close icon

How to you load an xml file into Gannt on startup

Your examples show picking a file and loading it but I want to load the same file every time my app starts. I am sure this is simple but I cannot figure out how

1 Reply

PR Pradeepa R V Syncfusion Team February 21, 2014 08:32 AM UTC

Hi Scott 

Thanks for contacting Syncfusion Support.

We can load the xml files into the Gantt by using ImportFromXml(String FilePath) method.

Incase if you need to  load the same file everytime once your app starts you can use the  same method as  Gantt.ImportFromXML(String FilePath) in MainWindow.Loaded event.

Below is the CodeSnippet for your reference,

 public MainWindow()

 {

    InitializeComponent();

    this.Loaded += MainWindow_Loaded;

 }

void MainWindow_Loaded(object sender, RoutedEventArgs e)

  {

     Gantt.ImportFromXML("F:\\GanttSample\\ImportExport\\Data\\MSProjectData.xml");

  }

Please let us know if you need any other assistance.

Regards,

Pradeepa

 


Loader.
Live Chat Icon For mobile
Up arrow icon