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.
Unfortunately, activation email could not send to your email. Please try again.

How to you load an xml file into Gannt on startup

Thread ID:

Created:

Updated:

Platform:

Replies:

115895 Feb 20,2014 12:30 PM Feb 21,2014 03:32 AM WPF 1
loading
Tags: GanttControl
Scott Greacen
Asked On February 20, 2014 12:30 PM

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

Pradeepa R V [Syncfusion]
Replied On February 21, 2014 03:32 AM

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

 


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.

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.

;