[CLOSED] Composite view and fit panel - MVC

  1. #1

    [CLOSED] Composite view and fit panel - MVC

    Hi,

    I'm experiencing a problem with a composite view;

    This is the content of the -Layout.cshtml

        <div>
            @(X.Viewport()
                .ID("ViewPort")
                .Layout(LayoutType.Border)
                        .Items(items1 =>
                        {
                            items1.Add(X.Panel()
                                .ID("TopPanel")
                                .Header(false)
                                .Region(Region.North)
                                .Height(90)
                                .Closable(false)
                                .Padding(0)
                                .Border(true));
    
                            items1.Add(
                                    X.Panel()
                                        .ID("WestPanel")
                                        .Header(false)
                                        .Region(Region.West)
                                        .Closable(false)
                                        .Padding(0)
                                        .Border(true)
                                        .Layout(LayoutType.Fit)
                                        .ItemsFromAction("LoadCommands", "Command"));
    
                            items1.Add(X.Container()
                                .ID("CenterPanel")
                                .Region(Region.Center)
                                .Padding(0)
                                .Border(true)
                                .Layout(LayoutType.Fit));
    
                            items1.Add(X.Panel()
                                .ID("BottomPanel")
                                .Header(false)
                                .Region(Region.South)
                                .Height(40)
                                .Closable(false)
                                .Padding(0)
                                .Border(true)
                                .StyleSpec("text-align: center;")
                                .Content(c => footerString));
                        }
                ))      
        </div>
    In the WestPanel I have a TreePanel, each node call an action as explained in the thread
    http://forums.ext.net/showthread.php...-Tree-Node-MVC

    DoubleClick on a node call the controller as explained in the code below:

            public Ext.Net.MVC.PartialViewResult UserManagement()
            {
                return new Ext.Net.MVC.PartialViewResult("CenterPanel");
            }
    And the code for the view is:

    @(X.Panel()
            .BodyPadding(15)
            .Layout(LayoutType.Fit)
            .Title("Inner panel")
            .Html("This panel is fit 100% Height and 100% Width within its container."))
    I have two problems:
    1. The panel don't fit the height
    2. Resizing the window the panel doesn't resize (width and height remain the same)



    Could you help me please.

    Best regard

    Andrea
    Last edited by Daniil; May 28, 2014 at 7:43 AM. Reason: [CLOSED]
  2. #2
    Please see the following example
    http://mvc.ext.net/#/Dynamic_Partial...Partial_Items/

    You have to set AddTo mode for PartialViewResult (which renders a view to center region)
  3. #3
    Quote Originally Posted by Vladimir View Post
    Please see the following example
    http://mvc.ext.net/#/Dynamic_Partial...Partial_Items/

    You have to set AddTo mode for PartialViewResult (which renders a view to center region)
    Thank you Vladimir, it works as expected.

    You can close the thread.

    Best regards

    Andrea

Similar Threads

  1. Replies: 2
    Last Post: Aug 30, 2013, 2:49 PM
  2. Replies: 1
    Last Post: Oct 26, 2012, 8:52 AM
  3. Replies: 1
    Last Post: Oct 07, 2011, 8:34 AM
  4. Replies: 2
    Last Post: Sep 22, 2011, 11:46 AM
  5. Tab Panel Under View Port
    By kiran malgi in forum 1.x Help
    Replies: 9
    Last Post: Mar 29, 2010, 9:42 AM

Posting Permissions