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

XML Data Binding Demo

Hello, could you please advise where I can find an XML Data Binding Demo for your GridData Control.

 

Thanks in advance,


3 Replies

SH Shakul Hameed M Syncfusion Team November 25, 2013 02:09 PM UTC

Hi Pierre,

 

Thanks for using Syncfusion products.

 

We have analyzed your query and you can bind XML to GridDataContorl using datatable as in the below code snippet,

 

Code snippet:

<Window.Resources>       

        <XmlDataProvider x:Name="MyXMlData" x:Key="MyKey" Source="MyXml.xml" Path="users/user" />       

</Window.Resources>

 

<syncfusion:GridDataControl x:Name="MyGrid" AllowEdit="True"  ColumnSizer="AutoOnLoad" >

</syncfusion:GridDataControl>

           

DataSet dataSet = new DataSet();

dataSet.ReadXml(@”\..\..\MyXml.xml”);

DataTable datatable = dataSet.Tables[0];

DataView dataView = new DataView(dataSet.Tables[0]);

MyGrid.ItemsSource = datatable;

 

We have created the sample regarding this and you can find the sample from the below location.

Location: XML_Binding_SYNCGrid.zip

 

Please let us know, if you have any query.

 

Regards,

Shakul hameed



PG Pierre Gilbert December 13, 2013 03:40 PM UTC

Thanks this answer my question.



SH Shakul Hameed M Syncfusion Team December 17, 2013 08:29 AM UTC

Hi Pierre ,

 

Thanks for your update.

Please get back to us, if you need further assistance,

 

Thanks,

Shakul Hameed



Loader.
Live Chat Icon For mobile
Up arrow icon