467,169 Members | 1,004 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,169 developers. It's quick & easy.

Edit XML Row - Problem

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!

Apr 10 '07 #1
  • viewed: 1913
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

25 posts views Thread by dixie | last post: by
9 posts views Thread by rn5a@rediffmail.com | last post: by
1 post views Thread by chromis | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.