FlexSheet for WPF | ComponentOne
Working with C1FlexSheet / Sheet Operations / Protect Sheets and Cell Locking
In This Topic
    Protect Sheets and Cell Locking
    In This Topic

    You can protect sheets and lock cells in FlexSheet for WPF. IsProtected property is used to protect sheets in C1FlexSheet control. The following code illustrates the use of IsProtected property:

    protectedSheet.IsProtected = True
    
    protectedSheet.IsProtected = true;
    

    AddLockedCell method can be used to lock cells in C1FlexSheet control. The AddLockedCell method locks the specified cell range, as illustrated in the following code:

    protectedSheet.AddLockedCell(0, 0, 1, 1)
    
    protectedSheet.AddLockedCell(0, 0, 1, 1);