Search code examples
silverlightspreadsheetgear

silverlight spreadsheetgear WorkbookView read only mode


Is there a way to switch WorkBookView in read only mode?

So the user will not be allowed to edit cells, paste to cells, use AutoFill feature, change width/height of columns/row, but still be able to switch between sheets and copy text from cells.


Solution

  • Your best option might be to use worksheet protection. This would involve ensuring IRange.Locked is set to true for all the cells you don't want modifiable (all cells in a worksheet have Locked set to true by default) and then enforcing worksheet protection via either:

    Users would then be restricted from editing, pasting into or otherwise altering cell contents, changing the width/height of row/column headers...etc. The user could still navigate to other sheets or copy cell contents with worksheet protection enabled.