-
January 29th, 2010, 08:08 AM
#1
Datagridview to XML file
I'm making a form that has some text and comboboxes and below
a datagridview. all this data has to be stored in a XML file.
The normal components i have stored that's easy.
but i've been trying for a day now to get the data from the datagridview to the XML file.
I read enough about people who use a dataset and store that to a XML file
but i didn't find a way to get the data that the user put in the datagridview into the dataset.
if there are any quiestions i'm happy to answer them
and i hope there is someone here who can help me.
-
January 29th, 2010, 08:37 AM
#2
Re: Datagridview to XML file
The first question is how does the data get into the grid view? Is this a Windows or ASP.NET grid? I'm sure you can find samples of databinding with Grid Views. What I would say though is that its unlikely you'll find anything out of the box that will write to an xml file. You could bind to a dataset and then you the 'WriteXml' to output to Xml.
Last edited by nelo; February 5th, 2010 at 05:38 AM.
Reason: Correctness...
-
February 5th, 2010, 05:20 AM
#3
Re: Datagridview to XML file
I'm using C# for a windows form so windows, and the user have to put in the data by hand and i want that data to be stored in XML.
indeed i have to use databindings but couldn't find any code to bind a new grid to a dataset and process that into XML. all the code i found was the other way around. read from xml to dataset and write it back. but the writing back is done with some code used for filling the grid.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|