S
Simon
Hi,
I was wondering if anyone had come across this problem I'm
having...Basically we have a DataRow object that is edited
by the user. The thing is we want to allow the user to be
able to edit it more than once before submitting it to the
db. The problem is when the user makes a change, then
decides to cancel it. CancelEdit takes the DataRow back to
its very first state, and loses all changes in between the
last save and the cancel. What is needed is for the DataRow
to be taken back one step, not right to the beginning.
We have investigated copying the DataRow's ItemArray using
DataTable.NewRow, but that means the new row's state is
"detached" and different to the original datarow. We would
just take a copy of the DataRow object, but it appears that
cloning objects in .Net isn't that well supported and
requires a lot of work to get working.
Has anyone got any suggestions as to how to go about this?
It seems like something that would be commmonly done. I'm
pretty new to .Net, so forgive me if I've missed a
blantantly obvious solution.
Thanks,
Simon
I was wondering if anyone had come across this problem I'm
having...Basically we have a DataRow object that is edited
by the user. The thing is we want to allow the user to be
able to edit it more than once before submitting it to the
db. The problem is when the user makes a change, then
decides to cancel it. CancelEdit takes the DataRow back to
its very first state, and loses all changes in between the
last save and the cancel. What is needed is for the DataRow
to be taken back one step, not right to the beginning.
We have investigated copying the DataRow's ItemArray using
DataTable.NewRow, but that means the new row's state is
"detached" and different to the original datarow. We would
just take a copy of the DataRow object, but it appears that
cloning objects in .Net isn't that well supported and
requires a lot of work to get working.
Has anyone got any suggestions as to how to go about this?
It seems like something that would be commmonly done. I'm
pretty new to .Net, so forgive me if I've missed a
blantantly obvious solution.
Thanks,
Simon