Hide dropdown in Radpanelbar outlookstyle

2 posts, 1 answers
  1. Alcatraz
    Alcatraz avatar
    15 posts
    Member since:
    Mar 2010

    Posted 14 Apr 2010 Link to this post

    Hi,

    Kindly help me out in hiding the dropdown in the radpanelbar when set in outlook style

    I tried setting the Dropdown button's enabled property to false, visibility to hidden but still its showing.  Pls help.

    Thanks
    Kris
  2. Answer
    Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 20 Apr 2010 Link to this post

    Hello KrisYs,

    In order to hide the dropdown button when you select a group, you need to set its Visibility to Hidden on Load of PanelBarElement. Please note that the children of RadPanelBar are changed dynamically, so you need to retake the RadDropDownButtonElement on Load as well:
    RadDropDownButtonElement button;
      
    public Form1()
    {
        InitializeComponent();
      
        button = (RadDropDownButtonElement)this.radPanelBar1.PanelBarElement.Children[0].Children[1].Children[2].Children[0];
        button.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
      
        this.radPanelBar1.PanelBarElement.Load += new EventHandler(PanelBarElement_Load);
    }
      
    void PanelBarElement_Load(object sender, EventArgs e)
    {
        button = (RadDropDownButtonElement)this.radPanelBar1.PanelBarElement.Children[0].Children[1].Children[2].Children[0];
        button.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
    }

    Best wishes,
    Nikolay
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top