T
Thomas A
Hi,
I fill a datgrid with data from a xml document, it works fine
But....
Now I will to filter the data to the grid so only the data shows from
the criteria that I set.
My code now is very simple to fill the grid
Dim strProj As String
Dim MyA As String()
Dim dsCodes As New DataSet
Dim fsReadXml As New System.IO.FileStream(XMLFile,
System.IO.FileMode.Open)
Dim XmlReader As New XmlTextReader(fsReadXml)
dsCodes.ReadXml(XmlReader)
XmlReader.Close()
'fill the grid
DataGrid1.DataSource = dsCodes.Tables(XMLTable)
I wont to show all customerdata for my customer in my grid there only
Proj No = strProj
My XML file looks like this:
<?xml version='1.0' encoding='utf-8' ?>
<!--Code Information-->
<xml>
<projectinfo>
<Cust No='2298' Name='Company1' Adress1='Adress1' Adress2
='Box 999'
Adress3='161 02 BROMMA' Phone='08-999 91 90' Fax=''
Trakt='0' />
<Proj No='445640' Name='Ongoing' />
</projectinfo>
<projectinfo>
<Cust No='2324' Name='Company2' Adress1='xxxxx' Adress2='Box
230'
Adress3='127 24 HOLMEN' Phone='08-999 99 00' Fax=''
Trakt='0' />
<Proj No='232401' Name='Ongoing' />
<Proj No='232402' Name='Test' />
<Proj No='232403' Name='Startup' />
</projectinfo>
</xml>
I have search for this but I couldnt find anything about it, maybe
someone has got an solution or a tips there I could find it.
//Regards Thomas
I fill a datgrid with data from a xml document, it works fine
But....
Now I will to filter the data to the grid so only the data shows from
the criteria that I set.
My code now is very simple to fill the grid
Dim strProj As String
Dim MyA As String()
Dim dsCodes As New DataSet
Dim fsReadXml As New System.IO.FileStream(XMLFile,
System.IO.FileMode.Open)
Dim XmlReader As New XmlTextReader(fsReadXml)
dsCodes.ReadXml(XmlReader)
XmlReader.Close()
'fill the grid
DataGrid1.DataSource = dsCodes.Tables(XMLTable)
I wont to show all customerdata for my customer in my grid there only
Proj No = strProj
My XML file looks like this:
<?xml version='1.0' encoding='utf-8' ?>
<!--Code Information-->
<xml>
<projectinfo>
<Cust No='2298' Name='Company1' Adress1='Adress1' Adress2
='Box 999'
Adress3='161 02 BROMMA' Phone='08-999 91 90' Fax=''
Trakt='0' />
<Proj No='445640' Name='Ongoing' />
</projectinfo>
<projectinfo>
<Cust No='2324' Name='Company2' Adress1='xxxxx' Adress2='Box
230'
Adress3='127 24 HOLMEN' Phone='08-999 99 00' Fax=''
Trakt='0' />
<Proj No='232401' Name='Ongoing' />
<Proj No='232402' Name='Test' />
<Proj No='232403' Name='Startup' />
</projectinfo>
</xml>
I have search for this but I couldnt find anything about it, maybe
someone has got an solution or a tips there I could find it.
//Regards Thomas