Load Panel from MVC Controller

  1. #1

    Load Panel from MVC Controller

    Hi guys,

    I am rewriting an application in Ext 2.0 and am looking for a way to load a Panel from an MVC controller.

    I can load using LoadMode.Frame from a Razor view, but I would prefer to use a controller.

    I have seen examples that use the following code for an aspx page:

    <ext:Panel ID="_pnl" runat="server" Title="test">
                    <AutoLoad Url="/View/LoadPanelContent">
                        <Params>
                            <ext:Parameter Name="containerID" Value="#{_pnl}" Mode="Value" />
                        </Params>
                    </AutoLoad>
                </ext:Panel>
    How do I create the same result using something like the following:

    pnl.Loader = new ComponentLoader()
        {
            AutoLoad = true,
            Url = "/View/LoadPanelContent",
            Mode = LoadMode.Component,
            Scripts = true
            
        };
    
    
        //pnl.Loader.Params = new ParameterCollection();
        
        
        pnl.Loader.Params.Add(
            new Parameter()
            {
                Name = "containerID",
                Value = "_pnl",
                Mode = ParameterMode.Value
            }
        );
    Thanks!!

    Stuart W


    Any help is greatly appreciated!!

    Stuart W
    Last edited by stu; Jun 13, 2012 at 8:39 AM. Reason: update
  2. #2

Similar Threads

  1. Replies: 1
    Last Post: Jul 02, 2012, 6:19 PM
  2. [CLOSED] [Razor] TreePanel load nodes from controller action
    By boris in forum 2.x Legacy Premium Help
    Replies: 8
    Last Post: May 18, 2012, 9:43 AM
  3. Load menu panel from controller
    By wadhah in forum 1.x Help
    Replies: 1
    Last Post: Oct 28, 2011, 1:48 PM
  4. how to load data to grid panel in page load
    By andylaiyongsing in forum 1.x Help
    Replies: 1
    Last Post: Apr 16, 2010, 10:27 AM
  5. Load Panel into Tab
    By Tbaseflug in forum 1.x Help
    Replies: 5
    Last Post: May 14, 2009, 12:51 PM

Tags for this Thread

Posting Permissions