I am trying to bind to the Content Template of a RadPanelBar with and object (see below). I am able to get the Panel Labels to display but the panel items are not expandable and they don't show the Rad Text Box inside the content.
<telerik:RadPanelBar RenderMode="Lightweight" ID="RadPanelBar1" Runat="server" Width="75%">
<Items>
<telerik:RadPanelItem runat="server">
<ContentTemplate>
<telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DetailMessage") %>'></telerik:RadTextBox>
</ContentTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelBar>
public class DetailInfo
{
public string DetailMessage { get; set; }
}
public class PanelInfo
{
public int PanelId { get; set; }
public string PanelLabel { get; set; }
public DetailInfo Details { get; set; }
public string DetailMessage {get; set; }
}
protected void Page_Load(object sender, EventArgs e)
{
List<PanelInfo> PanelLabels = Enumerable.Range(1, 10).Select(m =>
new PanelInfo
{
PanelLabel = String.Format("Panel {0}", m),
PanelId = m,
Details = new DetailInfo { DetailMessage = string.Format("Detail {0}", m) },
DetailMessage = String.Format("Message {0}", m),
}
).ToList();
RadPanelBar1.DataSource = PanelLabels;
RadPanelBar1.DataTextField = "PanelLabel";
RadPanelBar1.DataValueField = "PanelId";
RadPanelBar1.DataBind();
}