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
Printable View
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
Load the .xml file into a new dataset and bind it to the 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
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
Thanks