How to stop adding new sheet at run time.

Posted by: wedant on 8 September 2017, 1:06 pm EST

  • Posted 8 September 2017, 1:06 pm EST

    Hi,


    I have a grid on window form with multiple sheets. I do not want user to add new sheet to the grid using mouse click (or any other way). Grid got property such as AllowSheetMove but I could not get property such as AllowSheetAdd or AllowSheetRemove.


     


    Thanks in advance.


    Wedant


     


     

  • Replied 8 September 2017, 1:06 pm EST

    Wedant -

    What version of the control are you using?
  • Replied 8 September 2017, 1:06 pm EST

    Hi Bob,


    Thanks for quick respose. We are using  FarPoint 4.0.2001.2005 for Windows form (.Net).


    Wedant


     

  • Replied 8 September 2017, 1:06 pm EST

    The only way to add a sheet in v4(other than you allowing it in code somehow) is with the special tab on the tabstrip.  You can turn this off...

    FpSpread1.TabStripInsertTab = False
  • Replied 8 September 2017, 1:06 pm EST

    Thanks a lot Bob!
  • Replied 8 September 2017, 1:06 pm EST

    Hello,


    Not to complain too much Hmm, but this property is hardly intuitve. I would have expected something like AllowNew or AllowDelete properties on the FpSpread object itself. The only way I found this was by doing a forum search on TabStrip and looking at each individual thread until I found this one. Please consider adding and/or wrapping something like the above to get rid of the Insert icon on the TabStrip option. Thanks!

  • Replied 8 September 2017, 1:06 pm EST

    j2 -

    I will pass this by the developers for consideration.  In our defense, however, a simple search in the help file on 'TabStrip' would have gotten you to the property in about twenty listings from the first (most of which could have been skipped over) with an explanation as to what it is for.

  • Replied 8 September 2017, 1:06 pm EST

    Hey BobM,


    Sorry to sound like such a crab. I did check out the TabStrip class but nothing in the docs that I saw pointed to what I needed. I was looking all over for an FpSpread property to disallow adding new sheets. Even had I noticed the TabStripInsertTab property, it would not have jumped out at me as the solution to my needs. Also, the search on TabStrip did turn up a top of listings, most of which didn't pertain to this issue at all so I would have had to wade through who knows how many before I finally found the right one.


    The TabStrip appearance and avilable glyphs should be driven by FpSpread (or alternatively but not preferred Sheets) properties for AllowNew, AllowDelete, etc, and not the other way around as it is currently.


    You guys need no defense, you do an outstanding job. It's just that every once in a while you do things in a non-intuitive manner. It was nice meeting you last week when I was in for class.

Need extra support?

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

Learn More

Forum Channels