Updating xmldatasource from gridview
Posted on 2010-09-02
I have a gridview which is populated from an xmldatasource, "xmlSegments" (from an .xml file in App_Data).
Here's the bit out of the .aspx file:
<asp:GridView ID="GridView1" runat="server" DataSourceID="XmlSegments"
<asp:XmlDataSource ID="XmlSegments" runat="server"
I can edit the data, and when I look at it via the snippet below, I see the values are updated:
For Each cl As TableCell In editingRow.Controls
Dim contrl As Control = cl.Controls(0)
If TypeOf contrl Is TextBox Then
Dim newText As String = CType(contrl, TextBox).Text
However, when I write the .xml back via
The changes are not captured. What do I need to do before I write the file?