Jump to content
Software FX Community

Create a chart by loading a Dataset


raydenxxx
 Share

Recommended Posts

Hello,

I'm searching how to load a dataset from a xml file...I found the Load function for a System.data.dataset but no doc to explain how to use it... :(

In the doc I found how to create a dataset by connecting to the database but I don't want to do that.

Is it possible to directly load a xml file containing a dataset? (with the schema)

 Thanks,Raydenxxx 

Link to comment
Share on other sites

 I find how to... :(

 

  DataSet dataSet = new DataSet();   string dataPath = Path.Combine(Server.MapPath("App_Data"), "SupportServeur.xml");   //on lit le schema   dataSet.ReadXml(dataPath, XmlReadMode.ReadSchema);   //On prend un graph en bar   Chart1.Gallery = Gallery.Bar;   //on rempli le chart   Chart1.DataSourceSettings.Fields.Add(new FieldMap("LibelleDomaine", FieldUsage.Label));   Chart1.DataSourceSettings.Fields.Add(new FieldMap("NbDossiers", FieldUsage.Value));   Chart1.DataSourceSettings.DataSource = dataSet.Tables[1];

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...