This is a migrated thread and some comments may be shown as answers.

DataTable, AcceptChanges and GetChanges

1 Answer 508 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sinderela
Top achievements
Rank 1
Sinderela asked on 07 Jun 2012, 08:07 AM
Hello
I used a datatable for fill Grid.
I add row in datatable in my Code and I want to show  changes in my Grid.
for this work I used "dt.AcceptChanges()".
but i need used "dt.GetChanges()".
Because I use "dt.AcceptChanges() ", " dt.GetChanges()" is empty.
Now how do I use "dt.GetChanges()".

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 12 Jun 2012, 05:52 AM
Hi Sinderela,

You can use GetChanges method to view the copy of the DataTable with all changes made before calling the AcceptChanges method. The last method will reset the state of every row and the DataRowState also changes - all Added and Modified rows become Unchanged, and the Deleted rows are removed.

More information about this can be found in MSDN: GetChanges, AcceptChanges

I hope this information is helpful.

Greetings,
Julian Benkov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Sinderela
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or