Creating XML data from DataGridView
I didn't see a post anywhere on this and have been looking around trying to see if there is something already built in the .Net Framework but don't see it.
I want to use DataGridView (DGV) to allow users to create some data that I will store as XML for the application to use later. The DGV is a nice tool for displaying data and allowing users to edit it. I've done this sort of thing in the past by reading the rows and columns out of the DGV and creating the XML objects using XMLDocument. But it seems to me that this is a common enough task that Microsoft would have built it into a DataBinding or some thing to allow you to use DataSets and DataTables to reduce the coding required to do in manually.
Everything I've found so far seems to want you to manually build the XML document mimicking the columns you have already defined using the DGV gui when you desigend the form. Before I run off and build this myself, is anyone aware of class in the framework that does this? And how to use it to generate the DataTable from the DGV?
__________________
What you don\'t know can hurt you!
|