This project has moved. For the latest updates, please go here.

Best way for closing modal views with check for unsaved changes

Oct 17, 2008 at 7:30 AM


I have a SmartClient application that uses DevExpress controls. For views which must be opened as modal dialogs I use the XtraWindowWorkspace registered in the RootWorkitem.Workspaces collection. When I try to close the view (by the X button or my own Close button) I must be able to check if any changes was made in the view (for example by checking binded object state). If there are some unsaved changes I must show a message box with some question to user a I must be able to cancel the view closing.

I tried many ways to do that but none of them was fully working and clear.

Does someone has any idea how to solve this problem?

Thanks a lot, Jan.