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
585
DataChanged false and OriginalValue only contains the new values
posted

Hi

I have a datagrid bound to a list. One of my columns is a valuelist. I have created a save button where I iterate my changed rows, however the column with the value list even after a change the DataChanged value shows false and the OriginalValue contains my new value, so I cannot seem to detect whether the user has changed the value or not. It seems to be OK on cells that are tickboxes only on the valuelist cells.

 

Am I missing something obvious?

 

Thank you!

Dave

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi Dave,

    DataChanged in the grid means that the grid has changes that have not been saved to the data source. That's the local data source, not neccessarily the database at the back end. The grid only works with the local data source.

    So typically, once you leave the cell, the change in the grid is committed to the data source and so the grid's DataChanged is false.

    If you need to keep track of changes made to the data source so that you can update the back end, that would be something the data source itself should do. DataTable / DataSet does this, for example.

Reply Children