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
20
How to I check the status of a Row in the code behind
posted

I Have a scenario where an end user adds new records to the grid (say 200 rows)  at a time and clicks on a save button to save all the newly added records and edited records on the grid to the database.

So while looping through the rowcollection in the code behind for the save button click event, what property do i need to check if a row is newly added or has been updated.

 

thanks,

Sunil

 

 

  • 21382
    Verified Answer
    posted

    The XamWebGrid does not track that information as it is something that we wouldn't know.  That would be the responsibility of the Data Layer.

    There are a few ways to handle this type of situation.  The first would be to keep a property on your data objects , for example RecordState.  Then when one of your properties raises its PropertyChanged it can set the state of your object to a dirty state.