<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	FirstLook
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>FirstLook</h2>
    
    <% Html.Telerik().PanelBar()
       .Name("PanelBar")
       .Items(items =>
       {
           items.Add().Text("Item 1")
                      .LoadContentFrom("LoadOnDemandDocument", "TelerikMVC");
           items.Add().Text("Item 2")
                .Items(subItems => 
                      {
                          subItems.Add().Text("Sub Item 1");
                          subItems.Add().Text("Sub Item 2");
                          subItems.Add().Text("Sub Item 3");
                      });
       })
       .Render();
%>

<% Html.Telerik().ScriptRegistrar().OnDocumentReady(() =>
{
    %>
        var panelBar = $("#PanelBar").data("tPanelBar");
        panelBar.expand($("> li", panelBar.element)[0]);
    <%
    });
%>
</asp:Content>
