Locking sheets

Posted by: lg_sony_27 on 8 September 2017, 1:50 pm EST

  • Posted 8 September 2017, 1:50 pm EST

    Hi!


    I have 20 sheets and I want to lock a certain sheet every grading period by just clicking an image or button and want it to stay lock until i unlock it. I tried using this code I saw in this thread "FpSpread1.ActiveSheetView.DefaultStyle.Locked = True" but it did not work I get squiggly line so I changed it like "FpSpread1.ActiveSheet.DefaultStyle.Locked = True" which is working right but the problem is whenever I close and open again my winform the sheet is unlock again. What is the best thing I can do so that it will stay lock unless i unlock it?


     


    Thanks!

  • Replied 8 September 2017, 1:50 pm EST

    Hello,


    You would need to write this line of code every time you open the application. Spread will not "remember" settings made from last time. You need to set these settings every time the application is loaded.

  • Replied 8 September 2017, 1:50 pm EST

    Hi Scott!


    Thanks for the reply! I was thinking of saving the value "True or False" in a table and read from there.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels