RowState applied to whole table?!

G

Guest

I have a datagrid and a bunch of validation routines that fire on column and
row changing events. I was amazed to discover that when I added a new row
the rowstate for every row in the table had changed to "Added". This caused
all sorts of problems for the validation routines since it meant that a
pre-existing row no longer had an original version to check (i.e. rows that
hadn't been modified returned false to hasversion(dataRowVersion.Original).
This seems like very bizaare behaviour to me! What's the point of each row
having its own rowstate if it only reflects what happened to the latest row.
I tried putting in a e.row.acceptchanges into the dataRowChanged event, which
executes, but the row states still all say "Added".

How do I get the rowstate of each row to reflect what has actually happened
to that row?
 
M

Marina

I have never heard of this happening, nor have I experienced it. Perhaps you
should post a reproduceable example.
 
G

Guest

The embarassing answer is that I needed to invoke dataset.acceptchanges after
filling the dataset with readXML. Once I did that things behaved normally.
 

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