How to add a close button on each tab/page ?

6 posts, 1 answers
  1. Cantenot Frederic
    Cantenot Frederic avatar
    15 posts
    Member since:
    Jan 2010

    Posted 15 Oct 2010 Link to this post

    Hi,

    I would like to add a close button on each page of my RadPageView like in this link http://www.telerik.com/products/winforms/pageview.aspx (see attached file).

    I searched but I didn't find how to do it.

    Could you help me please ?

    Thanks.

    regards.

    Fred
  2. Answer
    Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 15 Oct 2010 Link to this post

    Hello Cantenot,

    You can use this:
    pageView.ViewElement.ShowItemCloseButton = true;

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga
  3. Cantenot Frederic
    Cantenot Frederic avatar
    15 posts
    Member since:
    Jan 2010

    Posted 15 Oct 2010 Link to this post

    Thanks. It was simple but  I didn't find it.

    Have a good day.

    Regards.

    Fred
  4. Chris Kirkman
    Chris Kirkman avatar
    101 posts
    Member since:
    Apr 2010

    Posted 12 Dec 2017 in reply to Emanuel Varga Link to this post

    I want to selectively show/hide the close button.  I have 2 tabs (pages) that I never want the user to be able to close; however, there are tabs that will be added at runtime dynamically that I want the user to be able to close.  How can I do this?
  5. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3462 posts

    Posted 13 Dec 2017 Link to this post

    Hello, Chris,

    Thank you for writing.  

    You can set the RadPageView.ViewElement.ShowItemCloseButton property to true. Thus, the close button will be shown on all pages. Then, just hide the buttons for the necessary tabs. Here is a sample code snippet demonstrating how to hide the close button: 
    this.radPageView1.ViewElement.ShowItemCloseButton = true;
     
    RadPageViewStripItem item = this.radPageViewPage2.Item as RadPageViewStripItem;
    item.ButtonsPanel.CloseButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;



    I hope this information helps. Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. Chris Kirkman
    Chris Kirkman avatar
    101 posts
    Member since:
    Apr 2010

    Posted 13 Dec 2017 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    thanks.  that does work.
Back to Top