[CLOSED] Layout Config

  1. #1

    [CLOSED] Layout Config

    I am using MVC/Razor. I am using a Radio group with a custom config:
    Html.X.RadioGroup() _
               .AllowBlank(False) _
               .AutoFitErrors(False) _
               .MsgTarget(MessageTarget.Side) _
               .FieldLabel("Template") _
               .Layout(LayoutType.Column) _
               .Items(
                 Html.X.Container() _
                 .ID("radioCol1") _
                 .ColumnWidth(1) _
              .Items(
                 Html.X.Component().Html("To Client").Cls("x-form-check-group-label"),
                 Html.X.Radio().ID("rdoClientFirst").BoxLabel("Client First or Simultaneously").BoxLabelStyle("font-weight:normal !important").BoxLabelAlign(BoxLabelAlign.After),
                 Html.X.Radio().ID("rdoFullyExecuted").BoxLabel("Fully Executed"),
                 Html.X.Component().Html("To RI").Cls("x-form-check-group-label"),
                 Html.X.Radio().ID("rdoRIFirst").BoxLabel("First or Simultaneously"),
                 Html.X.Radio().ID("rdoRISecond").BoxLabel("Second"),
                 Html.X.Radio().ID("rdoClientSignature").BoxLabel("Client Signature")
                )
                ))
    I have been trying to find the "pack" feature of the layout configuration so that I can get the radio group items to pack to the top, but I can't seem to find it. Is that still available in 2.0? If not, is there an equivalent?
    Last edited by Daniil; Sep 25, 2012 at 7:02 AM. Reason: [CLOSED]
  2. #2
    Hi @adelaney,

    There was no "pack" feature for Column layout. It is available for HBoxLayout and VBoxLayout.

    Though I am not 100% sure what you mean.

    If you would provide a mockup of the required layout, we could suggest something.
  3. #3
    How do you use layoutconfig in MVC for VBox?
  4. #4
    Hi @KBorkiewicz,

    Do you mean Razor? Here it is.

    Example
    <!DOCTYPE html>
    
    <html>
    <head>
        <title>Ext.Net.MVC v2 Example</title>    
    </head>
    <body>
        @Html.X().ResourceManager()
    
        @(Html.X().Container()
            .Height(200)
            .Width(200)
            .LayoutConfig(
                new VBoxLayoutConfig()
                {
                    Align = VBoxAlign.Stretch
                }
            )
            .Items(
                Html.X().Container().Flex(1).StyleSpec("background-color: green;"),
                Html.X().Container().Flex(1).StyleSpec("background-color: yellow;")
            )
        )
    </body>
    </html>
  5. #5
    That is what I meant, thank you. However I get these errors when I try to do that:

    "The best overloaded method match for 'Ext.Net.AbstractContainer.Builder<Ext.Net.Container,Ext.Net.Container.Builder>.LayoutConfig(System.Action<Ext.Net.LayoutConfigCollection>)' has some invalid arguments"
    
    "Argument 1: cannot convert from 'Ext.Net.VBoxLayoutConfig' to 'System.Action<Ext.Net.LayoutConfigCollection>'"
    Last edited by geoffrey.mcgill; Dec 06, 2012 at 2:43 PM. Reason: please use [CODE] tags
  6. #6
    What is the Ext.NET version you are trying with?
  7. #7
    Ext.NET.Pro.2.0.0
  8. #8
    Please update to v2.1.
  9. #9
    Thank you, it works!

Similar Threads

  1. Replies: 2
    Last Post: Jun 11, 2012, 2:40 PM
  2. [CLOSED] Ext.Net panel layout config...
    By ViDom in forum 1.x Premium Help
    Replies: 1
    Last Post: May 18, 2012, 11:01 AM
  3. [CLOSED] vbox layout inside column layout
    By craig2005 in forum 1.x Premium Help
    Replies: 2
    Last Post: Feb 04, 2011, 2:44 PM
  4. Replies: 2
    Last Post: Apr 07, 2010, 11:57 AM
  5. Web.config
    By swallace in forum 1.x Help
    Replies: 9
    Last Post: Dec 09, 2008, 10:28 AM

Tags for this Thread

Posting Permissions