[CLOSED] Column's constrain breaks grid's layout

  1. #1

    [CLOSED] Column's constrain breaks grid's layout

    On the following example, setting Column's Constrain to true breaks grid's layout





    <!DOCTYPE html>
    <html>
    <head runat="server">
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:GridPanel Margin="10" Title="Ext.Net" Border="true" Width="500" Height="370" runat="server">
            <Store>
                <ext:Store AutoLoad="true" runat="server">
                    <Proxy>
                        <ext:AjaxProxy Url="~/Example/LoadFakeRecords/">
                            <ActionMethods Read="POST" />
                            <Reader>
                                <ext:JsonReader RootProperty="data" />
                            </Reader>
                        </ext:AjaxProxy>
                    </Proxy>
                    <Model>
                        <ext:Model IDProperty="ID" runat="server">
                            <Fields>
                                <ext:ModelField Name="ID" Type="String" />
                                <ext:ModelField Name="Name" Type="String" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column Text="ID" DataIndex="ID" Constrain="true" runat="server" />
                    <ext:Column Text="Name" Flex="1" DataIndex="Name" Constrain="true" runat="server" />
                </Columns>
            </ColumnModel>
        </ext:GridPanel>
    </body>
    </html>
    namespace SandBox.Controllers
    {
        public class ExampleController : System.Web.Mvc.Controller
        {
            public ActionResult Index()
            {
                return View();
            }
    
            public ActionResult Index2()
            {
                return View();
            }
    
            public StoreResult LoadFakeRecords()
            {
                List<Entity> lst = new List<Entity>();
    
                for (int index = 0; index < 15; index++)
                {
                    lst.Add(new Entity
                    {
                        ID = index,
                        Name = string.Format("Name - {0}", index)
                    });
                }
    
                return new StoreResult(lst, lst.Count());
            }
        }
    
        [Serializable]
        public class Entity
        {
            public int ID { get; set; }
    
            public string Name { get; set; }
        }
    }
    Attached Thumbnails Click image for larger version. 

Name:	cc001.png 
Views:	16 
Size:	3.8 KB 
ID:	20411   Click image for larger version. 

Name:	cc002.png 
Views:	15 
Size:	3.6 KB 
ID:	20421  
    Last edited by Daniil; Feb 17, 2015 at 12:57 PM. Reason: [CLOSED]
  2. #2
    Hi Raphael,

    I've reproduced, but is a Column supposed to be used with a Constrain setting? Could you, please, clarify what behavior you expect/need?
  3. #3
    Column would be constrained within grid, so it would be possible to overcome the following issue: http://forums.ext.net/showthread.php?52001.
  4. #4
    It looks a Constrain setting is not a way to work around that issue. I posted there a follow-up with a possible solution.
    Last edited by Daniil; Feb 17, 2015 at 12:57 PM.

Similar Threads

  1. [OPEN] [#323] GridPanel inside Menu breaks layout
    By RCN in forum 3.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 29, 2015, 12:42 PM
  2. [CLOSED] TreePanel breaks ViewPort layout
    By RCN in forum 3.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 29, 2015, 11:14 AM
  3. [CLOSED] Group Header breaks layout
    By RCN in forum 3.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 26, 2015, 12:05 AM
  4. [CLOSED] SelectBox breaks layout
    By RCN in forum 3.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 19, 2015, 11:29 AM
  5. Replies: 0
    Last Post: Sep 17, 2014, 8:05 PM

Posting Permissions