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
195
XamSpreadsheet OnWorkbookDirtied
posted

Is there a way to suppress OnWorkbookDirtied when making changes (such as making a value in a cell uppercase) to a worksheet in a workbook bound to XamSpreadsheet?  I've tried to monitor SpreadsheetWorkbookDirtiedEventArgs to see if I could filter certain types of changes, but it doesn't appear to be showing what caused the the workbook to be dirty.

Thanks,

Andy

Parents
  • 54937
    Offline posted

    In addition to what Nick mentioned you might also be able to call UpdateLayout on the spreadsheet before making your changes (in case there is a pending dirty notification) then make your changes and then unhook or ignore the dirty event while you again call UpdateLayout. Note this will only work if the UpdateLayout will actually force a layout pass. If the framework is in a layout pass or for some other reason won't process the UpdateLayout then it won't work. If this doesn't work then please post a small sample demonstrating the issue and we can see if there is another way to work around it. Really the event is meant to allow one to perform a behavior like Excel where one can track when changes that Excel would prompt for a save might have occurred. For example changing the zoom, the active worksheet or scrolling wouldn't but changing state like the size of a row/column, data of cells, etc. would.

Reply Children