[CLOSED] Child Grid Column Width Issue

  1. #1

    [CLOSED] Child Grid Column Width Issue

    Hi,
    In the attached, you will notice that, the text of 1st column of child grid extends the width of column. It does not wrap. Is it a bug? Or I am missing something?

    It does not happen with parent grid. Only with grid in Row Expander.
    Attached Thumbnails Click image for larger version. 

Name:	Capture.PNG 
Views:	106 
Size:	30.1 KB 
ID:	4862  
    Last edited by Daniil; Oct 09, 2012 at 10:36 AM. Reason: [CLOSED]
  2. #2
    Hi @amitpareek,

    Thank you for the report.

    It should be already fixed.

    Could you provide a sample or test it yourself with the latest source for the SVN 2.1 branch?
  3. #3
    I will get latest and check it. However, are there any major changes from 2.0 to 2.1. Or can I easily migrate?
  4. #4
    Does'nt fix. I get exactly same issue in 2.1. Here's my child grid.

    <Plugins>
    
    
                                        <ext:RowExpander ID="RowExpander1" runat="server" ExpandOnDblClick="false"  IDMode="Explicit">
    
    
                                            <Component>
    
    
                                                    <ext:GridPanel ID="gridChild1" runat="server"  PageX="55" ForceFit="true" Width="930">
                                                    <Store>
                                                        <ext:Store ID="Store2" runat="server">
                                                            <Reader>
                                                                <ext:JsonReader IDProperty="fileId"></ext:JsonReader>
                                                            </Reader>
                                                            <Model>
                                                                <ext:Model ID="Model3" runat="server">
                                                                    <Fields>
                                                                        <ext:ModelField Name="fileId"></ext:ModelField>
                                                                        <ext:ModelField Name="version"></ext:ModelField>
                                                                        <ext:ModelField Name="effectiveTime" Type="Date"></ext:ModelField>
                                                                        <ext:ModelField Name="html"></ext:ModelField>
                                                                        <ext:ModelField Name="setID"></ext:ModelField>
                                                                        <ext:ModelField Name="DrugName"></ext:ModelField>
                                                                        <ext:ModelField Name="ShortDrugName">
                                                                            <Convert Handler="return record.data.DrugName.substring(0,70);"></Convert>
                                                                        </ext:ModelField>
                                                                    </Fields>
                                                                </ext:Model>
                                                            </Model>
                                                        </ext:Store>
                                                    </Store>
    
    
                                                    <ColumnModel ID="ColumnModel1" runat="server">
                                                        <Columns>
                                                            <ext:Column runat="server" Text="Label Title" DataIndex="DrugName" ID="Column4" Width="550" MaxWidth="550">
                                                            </ext:Column>
                                                            <ext:Column ID="Column5" runat="server" Text="Version" DataIndex="version" Width="50">
                                                            </ext:Column>
    
    
                                                            <ext:Column ID="Column6" runat="server" Text="Revision Date" DataIndex="effectiveTime" Width="150">
                                                                <Renderer Format="Date" FormatArgs="'j F, Y'" />
                                                            </ext:Column>
                                                            <ext:CommandColumn ID="CommandColumn2" runat="server" Width="180">
                                                                <Commands>
                                                                    <ext:GridCommand Text="Compare" Icon="ArrowRight" ToolTip-Text="Compare" CommandName="compare" MinWidth="75"></ext:GridCommand>
                                                                    <ext:GridCommand Text="View" Icon="ApplicationViewDetail" CommandName="viewHtml" MinWidth="50"></ext:GridCommand>
                                                                </Commands>
                                                                <Listeners>
                                                                    <Command Fn="App.SearchResultsCommands"></Command>
                                                                </Listeners>
                                                            </ext:CommandColumn>
                                                        </Columns>
                                                    </ColumnModel>
                                                    <View>
                                                        <ext:GridView ID="GridView2" runat="server"  PreserveScrollOnRefresh="true" >
                                                        </ext:GridView>
                                                    </View>
                                                </ext:GridPanel>
    
    
                                                      
                                                
    
    
                                            </Component>
                                            <%--Before="return App.OnGridResultsExpand(item,record,body,row,rowIndex)"--%>
                                            <Listeners>
                                                <BeforeExpand Handler="return App.OnGridResultsExpand(item,record,body,row,rowIndex);">
                                                </BeforeExpand>
    
    
                                            </Listeners>
                                            <DirectEvents>
                                                <BeforeExpand
                                                    OnEvent="BeforeExpand"
                                                    Before="return !body.rendered;"
                                                    Success="body.rendered=true;" Timeout="90000">
                                                    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{gridResults}.body}" />
                                                    <ExtraParams>
                                                        <ext:Parameter Name="setid" Value="record.data.setID" Mode="Raw" />
                                                        <ext:Parameter Name="version" Value="record.data.version" Mode="Raw"></ext:Parameter>
                                                    </ExtraParams>
                                                </BeforeExpand>
                                            </DirectEvents>
    
    
                                        </ext:RowExpander>
                                    </Plugins>
  5. #5
    Quote Originally Posted by amitpareek View Post
    I will get latest and check it. However, are there any major changes from 2.0 to 2.1. Or can I easily migrate?
    There are mainly improvements and bug fixes which should not break anything.

    We have not listed breaking changes at the moment, but there are a few. Looking at SVN log can help to migrate. Also you can always us here if you wish.
  6. #6
    Quote Originally Posted by amitpareek View Post
    Does'nt fix. I get exactly same issue in 2.1. Here's my child grid.
    Thank you for the code snippet. Though I was unable to reproduce the problem.

    Could you provide a full sample to run?
  7. #7
    Here's with complete grid panel. U can add any data source to it. It will give u same results.

    <ext:GridPanel runat="server" Split="true" Title="Results" Region="North" ID="gridResults" ItemID="gridResults"
                                    Height="320"
                                    Header="false" CollapseMode="Mini" Border="false" AnimCollapse="true" Collapsed="true">
                                    <VerticalScroller>
                                        <ext:GridPagingScroller NumberFromEdge="5" runat="server"></ext:GridPagingScroller>
                                    </VerticalScroller>
                                    <Store>
                                        <%-- <ext:Store ID="Store1" runat="server"  Buffered="true" PageSize="10000" PurgePageCount="0">--%>
                                        <ext:Store ID="Store3" runat="server">
                                            <Reader>
                                                <ext:JsonReader IDProperty="fileId"></ext:JsonReader>
                                            </Reader>
                                            <Model>
                                                <ext:Model ID="Model2" runat="server">
                                                    <Fields>
                                                        <ext:ModelField Name="fileId"></ext:ModelField>
                                                        <ext:ModelField Name="DrugName"></ext:ModelField>
                                                        <ext:ModelField Name="ShortDrugName">
                                                            <Convert Handler="return record.data.DrugName.substring(0,70);"></Convert>
                                                        </ext:ModelField>
                                                        <ext:ModelField Name="version" ServerMapping="Version"></ext:ModelField>
                                                        <ext:ModelField Name="date" Type="Date"></ext:ModelField>
                                                        <ext:ModelField Name="html"></ext:ModelField>
                                                        <ext:ModelField Name="setID"></ext:ModelField>
                                                        <ext:ModelField Name="followSearch"></ext:ModelField>
                                                        <ext:ModelField Name="Dosage"></ext:ModelField>
                                                        <ext:ModelField Name="HasVersions"></ext:ModelField>
                                                    </Fields>
                                                </ext:Model>
                                            </Model>
    
    
                                        </ext:Store>
                                    </Store>
                                    <ColumnModel runat="server">
    
    
                                        <Columns>
    
    
                                            <ext:Column runat="server" Text="Label Title" ID="colDrug" Flex="5" DataIndex="DrugName">
                                                <%-- <Renderer Handler="return App.getTitle(record.data.html)"></Renderer>--%>
                                            </ext:Column>
                                            <ext:Column ID="Column1" runat="server" Text="Version" DataIndex="version" Flex="1">
                                            </ext:Column>
    
    
                                            <ext:Column ID="Column3" runat="server" Text="Dosage" DataIndex="Dosage" Flex="2">
                                            </ext:Column>
    
    
                                            <ext:Column ID="Column2" runat="server" Text="Revision Date" DataIndex="date" Flex="2">
                                                <Renderer Format="Date" FormatArgs="'j F, Y'" />
                                            </ext:Column>
    
    
                                            <ext:CommandColumn ID="CommandColumn1" runat="server" Width="180">
                                                <Commands>
                                                    <ext:GridCommand Text="Follow" Icon="ArrowRight" CommandName="Follow" MinWidth="75">
                                                    </ext:GridCommand>
                                                    <ext:GridCommand Text="View" Icon="ApplicationViewDetail" CommandName="viewHtml"
                                                        MinWidth="50">
                                                    </ext:GridCommand>
                                                </Commands>
                                                <Listeners>
                                                    <Command Fn="App.SearchResultsCommands"></Command>
                                                </Listeners>
                                                <PrepareToolbar Fn="App.prepareToolbar"></PrepareToolbar>
                                            </ext:CommandColumn>
                                            
                                        </Columns>
                                        <Listeners>
                                            <ColumnResize Handler="#{gridChild1}.view.refresh()"></ColumnResize>
                                        </Listeners>
                                    </ColumnModel>
    
    
                                    <View>
                                        <ext:GridView runat="server" PreserveScrollOnRefresh="true">
                                            <%--     <GetRowClass Fn="App.OnRowRender"></GetRowClass>--%>
                                            <%--    <GetRowClass Fn="getRowClass"></GetRowClass>--%>
                                            <Listeners>
                                                <Refresh Fn="App.setRowExpanderSign"></Refresh>
                                            </Listeners>
                                        </ext:GridView>
                                    </View>
    
    
                                    <SelectionModel>
                                        <ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" XCheckOnly="true" ShowHeaderCheckbox="false" CheckOnly="true"
                                            runat="server">
    
    
                                            <Listeners>
                                                <Select Fn="App.onDrugSelect"></Select>
                                                <Deselect Fn="App.onDrugDeselect"></Deselect>
    
    
                                            </Listeners>
    
    
                                        </ext:CheckboxSelectionModel>
                                    </SelectionModel>
                                    <Plugins>
    
    
                                        <ext:RowExpander ID="RowExpander1" runat="server" ExpandOnDblClick="false"  IDMode="Explicit">
    
    
                                            <Component>
    
    
                                                    <ext:GridPanel ID="gridChild1" runat="server"  PageX="55" ForceFit="true" Width="930">
                                                    <Store>
                                                        <ext:Store ID="Store2" runat="server">
                                                            <Reader>
                                                                <ext:JsonReader IDProperty="fileId"></ext:JsonReader>
                                                            </Reader>
                                                            <Model>
                                                                <ext:Model ID="Model3" runat="server">
                                                                    <Fields>
                                                                        <ext:ModelField Name="fileId"></ext:ModelField>
                                                                        <ext:ModelField Name="version"></ext:ModelField>
                                                                        <ext:ModelField Name="effectiveTime" Type="Date"></ext:ModelField>
                                                                        <ext:ModelField Name="html"></ext:ModelField>
                                                                        <ext:ModelField Name="setID"></ext:ModelField>
                                                                        <ext:ModelField Name="DrugName"></ext:ModelField>
                                                                        <ext:ModelField Name="ShortDrugName">
                                                                            <Convert Handler="return record.data.DrugName.substring(0,70);"></Convert>
                                                                        </ext:ModelField>
                                                                    </Fields>
                                                                </ext:Model>
                                                            </Model>
                                                        </ext:Store>
                                                    </Store>
    
    
                                                    <ColumnModel ID="ColumnModel1" runat="server">
                                                        <Columns>
                                                            <ext:Column runat="server" Text="Label Title" DataIndex="DrugName" ID="Column4" Width="550" MaxWidth="550">
                                                            </ext:Column>
                                                            <ext:Column ID="Column5" runat="server" Text="Version" DataIndex="version" Width="50">
                                                            </ext:Column>
    
    
                                                            <ext:Column ID="Column6" runat="server" Text="Revision Date" DataIndex="effectiveTime" Width="150">
                                                                <Renderer Format="Date" FormatArgs="'j F, Y'" />
                                                            </ext:Column>
                                                            <ext:CommandColumn ID="CommandColumn2" runat="server" Width="180">
                                                                <Commands>
                                                                    <ext:GridCommand Text="Compare" Icon="ArrowRight" ToolTip-Text="Compare" CommandName="compare" MinWidth="75"></ext:GridCommand>
                                                                    <ext:GridCommand Text="View" Icon="ApplicationViewDetail" CommandName="viewHtml" MinWidth="50"></ext:GridCommand>
                                                                </Commands>
                                                                <Listeners>
                                                                    <Command Fn="App.SearchResultsCommands"></Command>
                                                                </Listeners>
                                                            </ext:CommandColumn>
                                                        </Columns>
                                                    </ColumnModel>
                                                    <View>
                                                        <ext:GridView ID="GridView2" runat="server"  PreserveScrollOnRefresh="true" >
                                                        </ext:GridView>
                                                    </View>
                                                </ext:GridPanel>
    
    
                                                      
                                                
    
    
                                            </Component>
                                            <%--Before="return App.OnGridResultsExpand(item,record,body,row,rowIndex)"--%>
                                            <Listeners>
                                                <BeforeExpand Handler="return App.OnGridResultsExpand(item,record,body,row,rowIndex);">
                                                </BeforeExpand>
    
    
                                            </Listeners>
                                         <%--   Before="return !body.rendered;"--%>
                                            <DirectEvents>
                                                <Expand
                                                    OnEvent="BeforeExpand"
                                                    
                                                    Success="body.rendered=true;" Timeout="90000">
                                                    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{gridResults}.body}" />
                                                    <ExtraParams>
                                                        <ext:Parameter Name="setid" Value="record.data.setID" Mode="Raw" />
                                                        <ext:Parameter Name="version" Value="record.data.version" Mode="Raw"></ext:Parameter>
                                                    </ExtraParams>
                                                </Expand>
                                            </DirectEvents>
    
    
                                        </ext:RowExpander>
                                    </Plugins>
    
    
                                </ext:GridPanel>
  8. #8
    Please provide test sample is not required any changes, your sample contains many absent code (direct event handlers and js functions for listeners)
    Please remove a code which irrelevant to the issue

Similar Threads

  1. [CLOSED] Grid Column Width
    By adelaney in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 13, 2012, 12:44 PM
  2. [CLOSED] Grid Panel : Column width (Auto width)
    By legaldiscovery in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 24, 2011, 8:31 PM
  3. [CLOSED] row expander - problem grid child width
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 15, 2010, 12:31 PM
  4. Replies: 0
    Last Post: Mar 12, 2010, 9:30 AM
  5. grid column width
    By [WP]joju in forum 1.x Help
    Replies: 1
    Last Post: Nov 11, 2009, 4:22 PM

Posting Permissions