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
1830
Service Update Event for Hierarchical Data
posted

I'm binding a few levels of data to xamDataGrid, and I needed to identify a good point/event to trigger a service call to persist the data.  My unit of work will be based on the outermost object in the hierarchy, and I don't want multiple dirty objects to accumulate because the unit of work would be too large.  The outer object's RecordUpdated() event will not work because a user can modify the inner objects without changing the outer object.

The only thing I can think of at the moment is to have a dirty flag that bubbles up the hierarchy, and to identify the best event to persist the dirty outermost object.  A focus change or record deactivation event might be tricky because hierarchies can be expanded, and the user can touch different levels of data in and out of the outermost object (an additional issue is how to handle the dirty flag when the user cancels an edit -- admittedly a little tricky when dealing with the hierarchical dirty flag).

Any ideas are appreciated.  Thanks!

Parents Reply Children
No Data