Items outside the container

  1. #1

    Items outside the container

    I'm testing ext.net mvc with Visual studio 2013 opening a new ASP.NET MVC5 and when i launch a Models examples as "Editor Template" http://mvc.ext.net/#/Models/Editor_Template/ occurs that items are placed outside from container.

    Complete solution can be download here: https://mega.co.nz/#!fAgzkIZS!9XzJVc...tNJYGQybAwenxM
    ... but it does not have any secret, new project asp.net mvc with vs2013 + baselayout + examples.css + sample downloaded from first link "editor template".
    Attached Thumbnails Click image for larger version. 

Name:	extnet_output.png 
Views:	26 
Size:	58.6 KB 
ID:	8881  
    Last edited by fastorro; Mar 25, 2014 at 2:35 PM.
  2. #2
    Hi @fastorro,

    It downloads not all of required files. I'll try to fix it.

    You should also put this files into the Views/Shared folder.

    Customer.cshtml
    @model Ext.Net.MVC.Examples.Areas.Models.Customer
    
    @Html.X().HiddenFor(c=>c.ID)
    @Html.X().TextFieldFor(c=>c.FirstName)
    @Html.X().TextFieldFor(c=>c.LastName)
    @Html.X().TextFieldFor(c=>c.Company)
    @Html.EditorFor(c=>c.ShippingAddress, new {itemId = "shippingAddress", title = "Shipping address", url = Url.Action("ShippingAddressSubmit")})
    @Html.EditorFor(c => c.BillingAddress, new { itemId = "billingAddress", title = "Billing address", copy = true, url = Url.Action("BillingAddressSubmit") })
    Address.cshtml
    @model Ext.Net.MVC.Examples.Areas.Models.Address
    
    @{
        string title = ViewData.ContainsKey("title") ? ViewData["title"].ToString() : "";
        string itemId = ViewData.ContainsKey("itemId") ? ViewData["itemId"].ToString() : "";
        string url = ViewData.ContainsKey("url") ? ViewData["url"].ToString() : "";
    }
    
    @(
     Html.X().FormPanel()
            .ItemID(itemId)
            .Title(title)
            .Url(url)
            .DefaultAnchor("100%")
            .StyleSpec("margin-bottom:5px;")
            .Frame(true)
            .Items(
                Html.X().TextFieldFor(a => a.StreetAddress),
                Html.X().TextFieldFor(a => a.ZipPostalCode),
                Html.X().TextFieldFor(a => a.City),
                Html.X().MvcItem(() => Html.EditorFor(a => a.Country))
            )
            .Tools(tools => {
                if (ViewData.ContainsKey("copy"))
                {
                    tools.Add(new Tool
                    {
                        Type = ToolType.Refresh,
                        ToolTip = "Copy from Shipping Address",
                        Handler = "var form = owner.ownerCt; form.getForm().setValues(form.up().down('#shippingAddress').getValues());"
                    });
                }
            })
            .Buttons(
                 Html.X().Button().Text("Submit " + title).Handler("this.up('form').submit();")
            )
    )
    Country.cshtml
    @using Ext.Net.MVC.Examples.Areas.Models
    @model Ext.Net.MVC.Examples.Areas.Models.Country
    
    @(
        Html.X().ComboBoxFor(m=>m.Code)
            .Items(Country.CountryItems)
            .SimpleSubmit(true)
            .FieldLabel("Country")
    )
    Last edited by Daniil; Mar 28, 2014 at 3:18 AM.

Similar Threads

  1. Replies: 0
    Last Post: Nov 18, 2013, 9:28 AM
  2. Replies: 3
    Last Post: Oct 23, 2013, 3:30 PM
  3. [CLOSED] Adding HTML elements to container items
    By jchau in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 19, 2012, 4:02 PM
  4. [CLOSED] Mixing Container Items and Content
    By sisa in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 23, 2012, 1:05 PM
  5. Replies: 6
    Last Post: Aug 13, 2010, 8:27 AM

Posting Permissions