Ext.net rowexpander调整大小标头不调整内容大小

时间:2013-11-04 19:58:52

标签: .net ext.net gridpanel

我正在使用.net 4和ext.net 2.2 我面对上述问题: 我有上面的gridpanel

<ext:GridPanel ID="GridPanelSites" runat="server" StoreID="StoreSites" Title="" ForceFit="true">
    <View>
        <ext:GridView ID="GridViewSites" runat="server" LoadMask="true" LoadingText="" />
    </View>
    <SelectionModel>
        <ext:RowSelectionModel ID="RowSelectionModelSites" runat="server" />
    </SelectionModel>
    <ColumnModel>
        <Columns>
            <ext:Column ID="col_address" runat="server" DataIndex="address" Text="" />
            <ext:Column ID="col_city" runat="server" DataIndex="city" Text="" />
            <ext:Column ID="col_contact_name" runat="server" DataIndex="contact_name" Text="" />
            <ext:Column ID="col_police_phone1" runat="server" DataIndex="police_phone1" Text="" />
            <ext:Column ID="col_children" runat="server" DataIndex="children" Text="" />
            <ext:Column ID="col_old_people" runat="server" DataIndex="old_people" Text="" />
            <ext:Column ID="col_total_people" runat="server" DataIndex="total_people" Text="" />
            <ext:ImageCommandColumn ID="col_edit" Text="" Align="Center" Width="100" runat="server">
                <Commands>
                    <ext:ImageCommand ToolTip-Text="" CommandName="cmdEditSite" Icon="HouseLink" />
                </Commands>
                <Listeners>
                    <Command Fn="onCommand" />
                </Listeners>
            </ext:ImageCommandColumn>
        </Columns>
    </ColumnModel>
    <Features>
        <ext:GridFilters runat="server" ID="GridFiltersMSites" Local="true">
            <Filters>
                <ext:StringFilter DataIndex="address" />
                <ext:StringFilter DataIndex="contact_name" />
                <ext:StringFilter DataIndex="total_people" />
            </Filters>
        </ext:GridFilters>
    </Features>
    <Plugins>
        <ext:RowExpander>
            <Component>
                <ext:GridPanel ID="GridPanelChildren" runat="server" Height="300" Layout="FitLayout"
                    StoreID="StoreActions" Title="">
                    <View>
                        <ext:GridView ID="GridViewChildren" runat="server" LoadMask="true" LoadingText="" />
                    </View>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="SelectionModelChildren" runat="server" />
                    </SelectionModel>
                    <ColumnModel>
                        <Columns>
                            <ext:Column ID="col_child_actiondescription" runat="server" DataIndex="action_description"
                                Text="" />
                            <ext:Column ID="col_child_type" runat="server" Width="70" DataIndex="actiontype_description"
                                Text="" />
                            <ext:Column ID="col_child_description" runat="server" Width="300" DataIndex="description"
                                Text="" />
                            <ext:Column ID="col_child_date" runat="server" Width="150" DataIndex="inserted_date"
                                Text="" />
                            <ext:Column ID="col_child_user" runat="server" Width="150" DataIndex="update_user_fullname"
                                Text="" />
                        </Columns>
                    </ColumnModel>
                    <Features>
                        <ext:GridFilters runat="server" ID="GridFiltersActions" Local="true">
                            <Filters>
                                <ext:StringFilter DataIndex="action_description" />
                                <ext:ListFilter DataIndex="actiontype_description" />
                                <ext:StringFilter DataIndex="description" />
                                <ext:StringFilter DataIndex="update_user_fullname" />
                                <ext:DateFilter DataIndex="inserted_date" />
                            </Filters>
                        </ext:GridFilters>
                    </Features>
                </ext:GridPanel>
            </Component>
            <DirectEvents>
                <BeforeExpand OnEvent="BeforeExpandChild">
                    <EventMask Msg="" ShowMask="true">
                    </EventMask>
                    <ExtraParams>
                        <ext:Parameter Name="id" Value="record.getId()" Mode="Raw" />
                    </ExtraParams>
                </BeforeExpand>
            </DirectEvents>
        </ext:RowExpander>
    </Plugins>
</ext:GridPanel>

当我重新调整父标题的大小时,行数据也会重新调整大小,如果列的数据大于列,则数据会中断并显示3个点。 问题是当我展开父行子网格时,如上图所示。 enter image description here。重新调整标题大小,但数据不会更改其宽度。我试图在过去的3天内找到解决方案。

我会感激任何帮助。

1 个答案:

答案 0 :(得分:2)

根据此解决方案http://forums.ext.net/showthread.php?13168&p=54291&viewfull=1#post54291,尝试将以下CSS添加到您的网页:

.x-grid .x-row-expander-control table {
    table-layout: fixed;
}