Divelements Community
Customer discussion of all Divelements products

When do I call DataSet.AcceptChanges() when bound to an editable grid?

Latest post 04-02-2008 14:58 by Justin. 0 replies.
  • 04-02-2008 14:58

    When do I call DataSet.AcceptChanges() when bound to an editable grid?

    I have a grid bound to a DataSet.  The grid is editable.  When I enter a new value in a cell and hit Enter I see my new value, but I also need to call AcceptChanges() right away on the DataSet.  I'm not sure the best place to do this...I've tried it in the AfterEdit event, but that doesn't work.  Can anyone help me out?

    EDIT:
    Let me ammend this a little.  I have a DataSet that has multiple DataTables with relationships set up, and also expression columns.  The grid is bound to one of the child DataTables and the parent DataTable has an expression column that computes a sum of the child talbe.  Well, that expression column doesn't update itself until I call DataSet.AcceptChanges.  BUT, I just noticed that if I have more than one row in the grid and I move focus to another row in the grid, the parent DataTable's expression column gets updated.  Why doesn't this happen after a change to the cell?  Why do I need to move focus away from the row?

    I hope this makes sense to anyone who reads it.  Also, I'm using SandGrid v1.06 in Visual Studio 2005.


    Thanks,
    Justin
Page 1 of 1 (1 items) | RSS
Copyright © 2008 Divelements Limited
Powered by Community Server (Commercial Edition), by Telligent Systems