RadPanelBar with single root item and headertemplate

2 posts, 0 answers
  1. Bart Reekmans
    Bart Reekmans avatar
    26 posts
    Member since:
    Mar 2010

    Posted 20 Jul 2012 Link to this post


    I'm trying to create a panelbar with a single (root) item which I can expand and collapse. 
    I've found the solution in this help section
    Now I'm tryning to add a button in the header of this root item, but without succes (setting the headertemplate for the root item works, but the expand/collapse button disappears)

    This is the complete code of my page : 

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Detail.aspx.cs" Inherits="Mobile_Detail" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="ScriptManager" runat="server" />
        <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="742px" Height="330px"
            Skin="MetroTouch" ExpandMode="FullExpandedItem" AllowCollapseAllItems="true">
            <CollapseAnimation Type="None"></CollapseAnimation>
                <telerik:RadPanelItem runat="server" Text="Root RadPanelItem1">
                <HeaderTemplate><asp:Button runat="server" Text = "TEST" /></HeaderTemplate>
                        <telerik:RadPanelItem Expanded="false">

    How can i achieve this? Thx
  2. Peter
    Peter avatar
    6637 posts

    Posted 24 Jul 2012 Link to this post

    Hi Chris,

    This is the expected behavior. The HeaderTemplate allows you to specify any content you need, so you can use it to add a custom image as well.

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top