Hello everyone. I am using this code to fill a DGV.
This works and my DGV populates. I'd like to format the data, but have no clue where to begin. I'm also a beginner so please explain if possible.Code:Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim xmlFile As XmlReader xmlFile = XmlReader.Create("C:\Data.xml", New XmlReaderSettings()) Dim ds As New DataSet ds.ReadXml(xmlFile) DataGridView1.DataSource = ds.Tables(0) End Sub
This is a node in my XML:
1. How do I format the <TransactionDate> to something like 01/01/2012 ?Code:-<Transaction> <TransactionID>661</TransactionID> <TransactionDate>41135</TransactionDate> <PayToTheOrderOf>Blah Blah Blah</PayToTheOrderOf> <TransactionAmount>-450</TransactionAmount> </Transaction>
2. How do I format the <TransactionAmount> to currency ?
3. How do I ORDER the results by <TransactionDate> in DESCENDING order ?
Thanks!


Reply With Quote