open pannel

2 posts, 0 answers
  1. Eva
    Eva avatar
    50 posts
    Member since:
    Jun 2010

    Posted 08 Sep 2011 Link to this post


    Can we open a pannel from a button click?
  2. Cat Cheshire
    Cat Cheshire avatar
    128 posts
    Member since:
    Jun 2010

    Posted 12 Sep 2011 Link to this post

    The PanelBar items have a property called "Expanded" that you can use for expanding them with a server-side code.
    At client-side the corresponding property is called set_expanded:
    <telerik:RadPanelBar runat="server"  ID="RadPanelBar1" Height="300px">
            <Items>
                <telerik:RadPanelItem  Text="ASP.NET controls">
                    <Items>
                        <telerik:RadPanelItem Text="RadMenu" Value="1">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadTabStrip">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadPanelBar">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadTreeView">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="WinForms controls">
                    <Items>
                        <telerik:RadPanelItem Text="RadMenustrip">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadTabStrip">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadToolStrip">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Other projects">
                    <Items>
                        <telerik:RadPanelItem Text="SiteFinity">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="Reporting">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadAjax">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
    <script type="text/javascript">
        function ExpandFirst() {
            var panelBar = $find("<%=RadPanelBar1.ClientID %>");
            panelBar.get_items().getItem(0).set_expanded(true);
     
        }
    </script>
    <input type="button" value="expand first item" onclick="ExpandFirst();" />
    <asp:Button ID="btnExpand" runat="server" Text="expand last item"
        OnClick="btnExpand_OnClick" />

    protected void btnExpand_OnClick(object sender, EventArgs e)
    {
        this.RadPanelBar1.Items[2].Expanded = true;
    }
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top