[CLOSED] Rowexpander nested gridpanel column width issue

  1. #1

    [CLOSED] Rowexpander nested gridpanel column width issue

    Hello support

    Great work on the frame work, really find ext.net to be a very powerful tool

    I don't know if this is a know issue, but when you create a gridpanel and add a rowexpander and in that expander you add another gridpanel

    The columns seem to have the incorrect width if the data in the cells are larger than the width off the columns.

    if have made a test page where you can see the issue.

    To make the issue appear you have to resize the column that is called "Message" in the inner grid once you have resized the column to be smaller then the data
    inside its cell it will push the other columns so the rest of the data are placed incorrect.

    Is there anything we can do to prevent this...

    Test page is below:
    %@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="LIA.APP.WEB.LinkItAll.LiaLogin.Test" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <%@ Import Namespace="Panel=Ext.Net.Panel" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (X.IsAjaxRequest)
            {
                //We do not need to DataBind on an DirectEvent
                return;
            }
    
            List<object> data = new List<object>();
    
            for (int i = 1; i <= 25; i++)
            {
                data.Add(new { ID = "S_" + i, Name = "Suppiler " + i, Type = "T_" + i, Message = "M_" + i });
            }
    
            this.Store1.DataSource = data;
            this.Store1.DataBind();
            ResourceManager1.AddAfterClientInitScript(String.Format("Test._grdID ='{0}';", GridPanel1.ID));
        }
    
    </script>
    
    <script type="text/javascript">
        var Test = {};
        Test._grdID = undefined;
        Test.loadData = function (item, body, record) {
            var grd = Ext.getCmp(Test._grdID);
            if (grd) {
                var list = [];
                for(var i = 0; i < 10; i++){
                    var obj = {};
                    obj.Name = "Product "+i;
                    obj.Message = "AWDASDASI_" + i;
                    obj.Type = "A_"+i;
                    list.push(obj);
                }
                var store = grd.getStore();
                store.loadData(list);
            }
        };
    </script>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    
    <body>
        
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" ViewStateMode="Disabled"
            EnableViewState="false" />
         <ext:Window ID="wndTest" runat="server" Width="800" Height="600" Layout="FitLayout">
             <Items>
                 <ext:GridPanel ID="grdTest" runat="server">
                    <Store>
                        <ext:Store ID="Store1" runat="server">
                            <Model>
                                <ext:Model ID="Model1" runat="server" IDProperty="ID">
                                    <Fields>
                                        <ext:ModelField Name="ID" />
                                        <ext:ModelField Name="Name" />
                                        <ext:ModelField Name="Type" />
                                        <ext:ModelField Name="Message" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                     <ColumnModel>
                         <Columns>
                             <ext:Column Text="Name" DataIndex="Name" runat="server"></ext:Column>
                             <ext:Column Text="Type" ID="Column2" DataIndex="Type" runat="server"></ext:Column>
                             <ext:Column Text="Message" ID="Column5" DataIndex="Message" runat="server"></ext:Column>
                         </Columns>
                     </ColumnModel>
                     <Plugins>
                    <ext:RowExpander ID="RowExpander1" runat="server">
                        <Component>
                            <ext:GridPanel ID="GridPanel1" runat="server">
                            <Store>
                                <ext:Store ID="Store2" runat="server">
                                    <Model>
                                        <ext:Model ID="Model2" runat="server" IDProperty="ID">
                                            <Fields>
                                                <ext:ModelField Name="ID" />
                                                <ext:ModelField Name="Name" />
                                                <ext:ModelField Name="Type" />
                                                <ext:ModelField Name="Message" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                             <ColumnModel>
                                 <Columns>
                                     <ext:Column Text="Name" ID="Column1" DataIndex="Name" runat="server"></ext:Column>
                                     <ext:Column Text="Type" ID="Column3" DataIndex="Type" runat="server"></ext:Column>
                                     <ext:Column Text="Message" ID="Column4" DataIndex="Message" runat="server"></ext:Column>
                                 </Columns>
                             </ColumnModel>
                        </ext:GridPanel>
                        </Component>
                        <Listeners>
                            <BeforeExpand Handler="Test.loadData(item,body,record)"></BeforeExpand>
                        </Listeners>
                    </ext:RowExpander>
                </Plugins>
                 </ext:GridPanel>
             </Items>
         </ext:Window>
        </form>
    </body>
    </html>
    Best regards
    Akpenob
    Last edited by Daniil; Jul 18, 2014 at 9:10 AM. Reason: [CLOSED]
  2. #2
    Hi @Akpenob,

    I cannot reproduce. Tested with the latest Ext.NET sources. Could you, please, also test with the latest? I seem to remember a similar issue that has been resolved.

    Also I test in FireFox. Is it specific to any browser?
  3. #3
    Hi @Danill

    I have just tried to download the latest version of Ext.Net
    And you are right, this issue are not present in the latest version.

    Thanks for the quick reply and great support.
    Keep up the good work :-)

    You can close this one..

    Best regards
    Akpenob

Similar Threads

  1. Replies: 2
    Last Post: Oct 15, 2013, 1:45 PM
  2. [CLOSED] How to change the width of GridPanel in RowExpander?
    By capbarbell in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 27, 2013, 12:59 AM
  3. Replies: 6
    Last Post: Jun 28, 2013, 6:08 AM
  4. Replies: 3
    Last Post: Apr 06, 2011, 6:27 PM
  5. Replies: 4
    Last Post: Jan 28, 2011, 9:55 AM

Tags for this Thread

Posting Permissions