|
-
Mar 9th, 2007, 11:34 AM
#1
Thread Starter
Fanatic Member
datagridview
I have a string which represents data in xml format.
How can I show this string into a gridview please?
So basically I would like to populate a datagridview with the xml data which is inside the string.
Thanks
-
Mar 9th, 2007, 11:53 AM
#2
Re: datagridview
Load the .xml file into a new dataset and bind it to the datagridview.
Last edited by Asgorath; Mar 9th, 2007 at 12:04 PM.
"The dark side clouds everything. Impossible to see the future is."
-
Mar 9th, 2007, 11:56 AM
#3
Thread Starter
Fanatic Member
Re: datagridview
please note that my data is not .xml
It is a string which has xml data in it. i.e. representation of data in xml format but in a long string.
Thanks
-
Mar 9th, 2007, 01:34 PM
#4
Re: datagridview
You can try something like this (code from memory, didn't test it... So I'm neither sure the syntax is correct nor it'll work)
vb Code:
Dim dt As New DataTable
Dim xmlString As String = "you xml string"
Dim reader As New StringReader(xmlString)
dt.ReadXml(reader)
DataGridView1.DataSource = dt
-
Mar 9th, 2007, 05:42 PM
#5
Thread Starter
Fanatic Member
Last edited by fmardani; Mar 9th, 2007 at 06:14 PM.
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
|