Disable Sheet Tabs

Posted by: jars on 8 September 2017, 2:20 pm EST

  • Posted 8 September 2017, 2:20 pm EST

    What is the properties to do it? I try hidding the tab but doesn't work for me, and try read only too but I need to see the sheet but disable.

     

    Thanks.

  • Replied 8 September 2017, 2:20 pm EST

    Hello,

    I don't find a way to disable the Sheet tab. However you should be able to hide this using:

            FpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Never

     

     

    Thanks, 

  • Replied 8 September 2017, 2:20 pm EST

    Hi,

     

    Thanks but this doesn't work for me, because the TabStripPolicy.Never hide me the TabStripInsertTab too, I'll try with the VISIBLE=FALSE propertie for each Sheet in the collection.

     

    Thanks for you reply.

  • Replied 8 September 2017, 2:20 pm EST

    Hello Jars,


    Yes you are right, you need to set Sheet's visible property to false. However, in case you want to enable/disable certain sheets based on different criteria then you can trap the ActiveSheetChanged event and then set the sheet visiblility to false based on certain criteria or you can do this in FormLoad event as well.


    Code snippet for the same is:



      private void fpSpread1_ActiveSheetChanged(object sender, EventArgs e)
            {
                if (fpSpread1.Sheets[0].Cells[0, 0].Text == "Test")
                    fpSpread1.Sheets[1].Visible = false;
            }


    Hope this will help. Thanks.

Need extra support?

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

Learn More

Forum Channels