Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
650
Datarow not modified in AfterCellUpdate
posted

I have a Grid bound to a datatable.

It is not bound to the database via a Adapter or anything so I have to handle the DB update myself.

In the AfterCellUpdate event I populate a DataView with my DataTable and check for the RowStateFilter

However it never finds the row that I just modified.

In the CellEventArgs of AfterCellUpdateit it does show that e.Cell.DataChanged is true and the value in the DataRow is changed, its just not marked as modified so I can't do my DB update

How can I make this change to modified?

Parents
No Data
Reply
  • 53790
    posted

    Hi,

    I`m not sure what exactly is your scenario, but maybe you need to set a property UpdateMode of your UltraGrid. For example:
    ultraGrid1.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus.

    You can get the modified rows by using:
    - DataTable dt = new DataTable();
    - dt.GetChanges(DataRowState.Modified);
    or
    -DataTable dt = new DataTable();
    -DataView dv = new DataView(dt);
    -dv.RowStateFilter = DataViewRowState.ModifiedOriginal
      
    If you would like to accept the changes that are pending in your DataTable you could call AcceptChanges() method.
    Please if you have any questions, do not hesitate to ask me

Children
No Data