Expand on server side in master page

3 posts, 1 answers
  1. Web Services
    Web Services avatar
    243 posts
    Member since:
    Apr 2008

    Posted 18 Aug 2009 Link to this post

    I need to expand a rad panel bar that is in a master page based on what page is loaded. I have this in my page load method but I get a null reference error. I'm guessing it's because the panelbar is in the master page. How do I access my panelbar in child page and expand one of the items of my choice. Here is the code I am trying
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

            Dim panel As RadPanelBar = Master.FindControl("RadPanelBar1")
            Dim item As RadPanelItem = panel.Items.FindItemByText("Entities")
            item.Expanded = True

        End Sub
  2. Answer
    Paul
    Admin
    Paul avatar
    4281 posts

    Posted 21 Aug 2009 Link to this post

    Hi Web Services,

    Please refer to our PanelBar / Programmatic State Persistence example for details on how to achieve your goal.

    Best wishes,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Web Services
    Web Services avatar
    243 posts
    Member since:
    Apr 2008

    Posted 21 Aug 2009 Link to this post

    That's what I needed thanks.
Back to Top