Hi all
I'm pretty new to VB.net programming - most of my experience is in VBA Office 2k3 - and I was hoping I've got a pretty easy question...
I've got an XML file that I'd like to display on a form... looking into this a bit, it seems that I'd want to use a DataGridView... so far, I've been able to read the XML into it but I can't quite figure out how to perform edits within the View and then write those out back to the XML...
Here's what I've done so far...
Can someone explain to me why reading the ".Tables(0)" is necessary? I've seen examples without it, so I'm curious... here's my XML file...
Looking around, I've seen references to GridView_RowUpdating but I guess this doesn't apply to VB.Net?
Many thanks in advance!
-Justin
I'm pretty new to VB.net programming - most of my experience is in VBA Office 2k3 - and I was hoping I've got a pretty easy question...
I've got an XML file that I'd like to display on a form... looking into this a bit, it seems that I'd want to use a DataGridView... so far, I've been able to read the XML into it but I can't quite figure out how to perform edits within the View and then write those out back to the XML...
Here's what I've done so far...
VB.NET:
Private Sub MatchMakerXML_Editor_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
XMLFilePath.Text = c_MatchMakerXML.XMLFilePath
Dim MatchMakerXML_Dataset As New DataSet
MatchMakerXML_Dataset.ReadXml(c_MatchMakerXML.XMLFilePath)
XMLGridView.DataSource = MatchMakerXML_Dataset.Tables(0)
End Sub
Can someone explain to me why reading the ".Tables(0)" is necessary? I've seen examples without it, so I'm curious... here's my XML file...
VB.NET:
<MATCHLIST>
<MATCH>
<AUTOCAD>UNIT</AUTOCAD>
<DATABASE>UNIT</DATABASE>
</MATCH>
<MATCH>
<AUTOCAD>UNIT</AUTOCAD>
<DATABASE>UNIT</DATABASE>
</MATCH>
</MATCHLIST>
Looking around, I've seen references to GridView_RowUpdating but I guess this doesn't apply to VB.Net?
Many thanks in advance!
-Justin