design question, using xml-serializable objects with databound controls

K

KJ

Hello Folks,

I am working with a third party web service whose inputs and outputs
are always passed as XmlNode objects.

To work with this system, I am using two MS tools:

1) xsd.exe: to generate strongly-typed datasets from the Xml messages
for easy databinding (using DataSet.ReadXml(), for example)

2) xsdobjectgen.exe: for serialization/deserialization of xml from
strings to classes and back

When displaying data, I can bind to controls such as GridView using
the strongly-typed datasets.

My question is, when a user modifies a single DataGridViewRow in the
GridView, how would I get just that one modified DataGridViewRow and
turn it back into an object using xml deserialization, so I can then
send it back to the web service to be updated?

-KJ
 
G

Guest

A lot of that depends on the kind of client you are using. Basically the
modified (edited) row in the DataGridView needs to update the DataRow in the
underlying DataSource. Since this would now have a RowState of Modified, you
can use GetChanges to collect any modified rows and do whatever you need with
them.
Peter
 

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

Top