datagrid moving rows

P

Philip Rayne

I have populated a datagrid with the contents on an XML file.

I have created 2 buttons on my form "Move Up" and "Move Down". I would like
these buttons to physically move a row up and down the datagrid. Then I
would like to resave the contents of this grid to an XML file with the order
of the rows preserved in the grid.

Basically, I want to be able to sort the items in my XML file via the
datagrid, so when I load the XML file elsewhere the items are in the order I
have specified.

I am not very strong on my XML skills, but I would image that I need to
either somehow manipulate the existing XML DOM object and resave that,
rebind the grid so it picks up the changes, or create a brand new XML DOM
object, populating this with the contents of the grid, and then rebinding
the grid.

Can someone please give me some pointers/examples of what it is I need to
do. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top