EXT.NET 3.1 RELEASED! With Tablet Support!
We have been working hard and are happy to announce the release of Ext.NET 3.1. Click here for a full list of changes and make sure you visit our download page now to get the latest version.
Results 1 to 2 of 2

Thread: Creating Accordion Layout Menu dynamically from AjaxStoreResult

  1. #1
    Join Date
    Sep 2010

    Creating Accordion Layout Menu dynamically from AjaxStoreResult

    Hi All is there any way to create accordion layout dynamically from AjaxStoreResult.
    As WestMenu in ext.net MVC example is hardcorded.

  2. #2
    Join Date
    Sep 2010
    Master page is like this

    <West Split="true" CollapseMode="Default" Collapsible="true" MaxWidth="200" MarginsSummary="0 0 4 4">
    <ext:Panel ID="Panel2" runat="server" Title="Navigation" Width="225">
    <%= ViewData["Menu"] %>
    <BeforeRender Url="/Data/CreatMenu" />

    In Action am doing this
    TreePanel tree = new TreePanel();

    tree.Title = "Online Users";
    tree.RootVisible = false;

    Ext.Net.TreeNode root = new Ext.Net.TreeNode();
    root.NodeID = "root";


    Ext.Net.TreeNode node1 = new Ext.Net.TreeNode();

    node1.Text = "Friends";
    node1.Expanded = true;

    node1.Nodes.Add(new Ext.Net.TreeNode("Jack", Icon.User));
    node1.Nodes.Add(new Ext.Net.TreeNode("Brian", Icon.User));
    node1.Nodes.Add(new Ext.Net.TreeNode("Jon", Icon.User));
    node1.Nodes.Add(new Ext.Net.TreeNode("Tim", Icon.User));
    node1.Nodes.Add(new Ext.Net.TreeNode("Nige", Icon.User));
    node1.Nodes.Add(new Ext.Net.TreeNode("Fred", Icon.User));
    node1.Nodes.Add(new Ext.Net.TreeNode("Bob", Icon.User));


    Ext.Net.TreeNode node2 = new Ext.Net.TreeNode();
    node2.Text = "Family";
    node2.Expanded = true;

    node2.Nodes.Add(new Ext.Net.TreeNode("Kelly", Icon.UserFemale));
    node2.Nodes.Add(new Ext.Net.TreeNode("Sara", Icon.UserFemale));
    node2.Nodes.Add(new Ext.Net.TreeNode("Zack", Icon.UserGreen));
    node2.Nodes.Add(new Ext.Net.TreeNode("John", Icon.UserGreen));


    Ext.Net.Panel panel1 = new Ext.Net.Panel("Settings");
    Ext.Net.Panel panel2 = new Ext.Net.Panel("Even More Stuff");
    Ext.Net.Panel panel3 = new Ext.Net.Panel("My Stuff");

    Toolbar toolbar = new Toolbar();

    Ext.Net.Button button1 = new Ext.Net.Button();
    button1.Icon = Icon.Connect;

    ToolTip tooltip = new ToolTip();
    tooltip.Title = "Rich ToolTips";
    tooltip.Html = "Let your users know what they can do!";


    Ext.Net.Button button2 = new Ext.Net.Button();
    button2.Icon = Icon.UserAdd;

    Ext.Net.Button button3 = new Ext.Net.Button();
    button3.Icon = Icon.UserDelete;


    Window window = new Window();

    window.Title = "Accordion Window";
    window.Width = Unit.Pixel(250);
    window.Height = Unit.Pixel(400);
    window.Maximizable = true;
    window.Icon = Icon.ApplicationTileVertical;
    window.BodyBorder = false;
    window.Layout = "Accordion";



    StringBuilder sb = new StringBuilder();
    StringWriter tw = new StringWriter(sb);
    HtmlTextWriter hw = new HtmlTextWriter(tw);

    window.RenderControl(hw); // This is giving false code
    ViewData["Menu"] = sb;

    return sb.ToString();


    Is there anyway to get control innerhtml?

Similar Threads

  1. Replies: 8
    Last Post: Jul 29, 2012, 10:58 AM
  2. Replies: 0
    Last Post: Mar 27, 2012, 10:01 AM
  3. [CLOSED] problem creating accordion Dynamically
    By SymSure in forum 1.x Premium Help
    Replies: 7
    Last Post: Apr 08, 2011, 10:35 PM
  4. Accordion layout
    By Elie.fakhry in forum 1.x Help
    Replies: 1
    Last Post: Oct 12, 2010, 8:53 PM
  5. [CLOSED] accordion menu in codebehind
    By vali1993 in forum 1.x Premium Help
    Replies: 3
    Last Post: Mar 29, 2010, 5:34 PM

Tags for this Thread

Posting Permissions