DataTable, AcceptChanges and GetChanges

2 posts, 0 answers
  1. Sinderela
    Sinderela avatar
    3 posts
    Member since:
    May 2012

    Posted 07 Jun 2012 Link to this post

    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()".

  2. Julian Benkov
    Julian Benkov avatar
    1135 posts

    Posted 12 Jun 2012 Link to this post

    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.

    Julian Benkov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top