$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
DataGridView WinForms Control
Powerful GridView C#.NET control supports data binding to various data sources
Home > WinForms UI Controls > User Manual > Binding to XML in C#

GridView Data Binding to XML in C#.NET

The Kettic DataGridView Control is able to be bound to any XML, custom business object and web service directly in Windows Forms development environments. The data binding operation only need the data objects implement one of these interfaces, IList, IEnumarable, or ICollection. Additionally, the powerful DataGridView control supports out of the box binding to objects in sub directory as well as their properties for customizing.

Bind GridView to XML

The Kettic DataGridView Control does not support the data binding to XML directly, but accomplish data binding to XML through DataTables. Users of the Kettic DataGridView component are able to create DataSet and DataTables from an XML document. The following is a XML file used in data binding for GridView control.

<?xml version="1.0" encoding="utf-8"?>
<name> Simon </name>
<age> 35 </age>
<name> Matt </name>
<age> 32 </age>
<name> David </name>
<age> 31 </age>
To bind GridView component to XML, we need to create a DataSet instance from the xml file first. In the example of the XML file above, there is only a single DataTable which is set as the data source of Kettic GridView control. It is also possible to bind GridView to hierarchy data of XML file, which is available on binding to hierarchy data. The following are the C# code used to bind GridView component to XML file.

DataSet xmlDataSet = new DataSet();
this.ketticGridView1.DataSource = xmlDataSet.Tables[0];
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls