using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.WebControls; 

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
      // Create first root item
      RadPanelItem rpItem = new RadPanelItem();
      rpItem.Text = "Politics";
      rpItem.CssClass = "MainItem";
      rpItem.Expanded = true;

      RadPanelbar1.Items.Add( rpItem );

      // Add sub-items
      RadPanelItem rpiSubItem = new RadPanelItem();
      rpiSubItem.Text = "CNN";
      rpItem.Items.Add( rpiSubItem );

      rpiSubItem = new RadPanelItem();
      rpiSubItem.Text = "NBC";
      rpItem.Items.Add( rpiSubItem );

      rpiSubItem = new RadPanelItem();
      rpiSubItem.Text = "ABC";
      rpItem.Items.Add( rpiSubItem );


      // Create second root item
      rpItem = new RadPanelItem();
      rpItem.Text = "Sports";
      rpItem.CssClass = "MainItem";
      rpItem.Expanded = false;

      RadPanelbar1.Items.Add( rpItem );

      // Add sub-items
      rpiSubItem = new RadPanelItem();
      rpiSubItem.Text = "US Sports";
      rpItem.Items.Add( rpiSubItem );

      rpiSubItem = new RadPanelItem();
      rpiSubItem.Text = "European Sports";
      rpItem.Items.Add( rpiSubItem );

      // Create third root item
      rpItem = new RadPanelItem();
      rpItem.Text = "Events";
      rpItem.CssClass = "MainItem";
      rpItem.Expanded = true;

      RadPanelbar1.Items.Add( rpItem );

      // Add sub-items
      rpiSubItem = new RadPanelItem();
      rpiSubItem.Text = "Oscar Awards";
      rpItem.Items.Add( rpiSubItem );

      rpiSubItem = new RadPanelItem();
      rpiSubItem.Text = "MTV Movie Awards";
      rpItem.Items.Add( rpiSubItem );
    }
}
