First, I am new to .NET. I have a internal log which is an XML file
that I'm setting up.
I can add and sort rows but can't EDIT them.
'Set this up for editing File
ds.Tables("entry").DefaultView.RowFilter = "id='" & strID.Value &
"'"
If ds.Tables("entry").DefaultView.Count = 1 Then 'Found correct
row
ds.Tables("entry").Rows(E.Item.ItemIndex).Item("us er") =
strMessage.Value
ds.Tables("entry").Rows(E.Item.ItemIndex).Item("us er") =
strUser.Value
End If
This would work if I didnt allow users to sort XML, since the
datagrid
is sorted, the index (E.Item.ItemIndex) of the datagrid does not
match
the index of the XML
Even though I filtered and ds.Tables("entry").DefaultView = 1 I can't
figure out how to edit that ONE ROW
I get read-only when I try below line
ds.Tables("entry").DefaultView.Item("message") = strMessage.Value
and since this uses the datagrid index it is wrong
ds.Tables("entry").Rows(E.Item.ItemIndex).Item("me ssage") =
strMessage.Value
Please help me end the pain!