[CLOSED] the dropdownfield with TreePanel don't display in ie7

  1. #1

    [CLOSED] the dropdownfield with TreePanel don't display in ie7

    I wrapped treepanel with dropdown in a usercontrol . but the don't display in ie7. but it's ok in ie8

    Click image for larger version. 

Name:	未命名.jpg 
Views:	155 
Size:	84.2 KB 
ID:	2574


    Click image for larger version. 

Name:	QQ五笔截图未命名.png 
Views:	127 
Size:	32.5 KB 
ID:	2575


    the usrcontrol code:
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PCategory.ascx.cs" Inherits="ZCB2C.Admin.UserControls.PCategory" %>
    <Ext:ContainerLayout ID="ContainerLayout1" runat="server">
        <Items>
            <Ext:CompositeField ID="CompositeField1" runat="server" Anchor="100%">
                <Items>
                    <Ext:DropDownField ID="Field3" runat="server" Editable="false" TriggerIcon="SimpleArrowDown"
                        LabelAlign="Right" FieldLabel="商品分类" Flex="1" MinWidth="100">
                        <Component>
                            <Ext:TreePanel ID="TreePanel1" runat="server" Icon="Accept" AutoHeight="true" Shadow="None"
                                UseArrows="true" AutoScroll="true" EnableDD="true" ContainerScroll="true" RootVisible="false">
                                <Loader>
                                    <Ext:PageTreeLoader OnNodeLoad="NodeLoad" PreloadChildren="true">
                                        <EventMask ShowMask="true" Msg="正在加载数据,请等待..." />
                                    </Ext:PageTreeLoader>
                                </Loader>
                                <Root>
                                    <Ext:AsyncTreeNode NodeID="0" Text="商品分类" />
                                </Root>
                                <DirectEvents>
                                    <DblClick OnEvent="TreePanel_DblClick">
                                        <ExtraParams>
                                            <Ext:Parameter Name="id" Value="#{TreePanel1}.getSelectionModel().getSelectedNode().id"
                                                Mode="Raw" />
                                            <Ext:Parameter Name="text" Value="#{TreePanel1}.getSelectionModel().getSelectedNode().text"
                                                Mode="Raw" />
                                        </ExtraParams>
                                    </DblClick>
                                </DirectEvents>
                            </Ext:TreePanel>
                        </Component>
                    </Ext:DropDownField>
                    <Ext:Hidden ID="SelectedID" runat="server">
                    </Ext:Hidden>
                </Items>
            </Ext:CompositeField>
        </Items>
    </Ext:ContainerLayout>
    the owner page code snip:
    <%@ Register Src="../UserControls/PCategory.ascx" TagName="PCategory" TagPrefix="uc1" %>
    <Ext:Window ID="SearchWindow4Product1" runat="server" Icon="Group" Title="选择商品" Width="650"
        Height="450" AutoShow="false" Hidden="true" Frame="false"  Border="false">
        <Items>
            <Ext:Panel ID="Panel7" runat="server" AutoHeight="true" Frame="true" Title="查询条件"
                TitleCollapse="true" Collapsible="false" Layout="TableLayout" LabelWidth="40"  Border="false">
                <Items>
                    <Ext:ColumnLayout ID="ColumnLayout1" runat="server" Split="true" FitHeight="false" >
                        <Columns>
                            <Ext:LayoutColumn ColumnWidth="0.4">
                                <Ext:Panel ID="panel3" runat="server" Layout="form" AutoHeight="true" Border="false">
                                    <Items>
                                        <Ext:TextField ID="txtKeywords" runat="server" FieldLabel="关键字" Width="100" />
                                        <Ext:ComboBox ID="ddlProductClass" runat="server" Editable="false" TypeAhead="true"
                                            FieldLabel="商品类型" Mode="Local" ForceSelection="true" TriggerAction="All" SelectOnFocus="true"
                                            Width="100">
                                        </Ext:ComboBox>
                                        <Ext:ComboBox ID="ddlInvalid" runat="server" Editable="false" TypeAhead="true" Mode="Local"
                                            ForceSelection="true" TriggerAction="All" SelectOnFocus="true" FieldLabel="是否上架"
                                            SelectedIndex="2" Width="60">
                                            <Items>
                                                <Ext:ListItem Text="所有" Value="-1" />
                                                <Ext:ListItem Text="下架" Value="0" />
                                                <Ext:ListItem Text="上架" Value="1" />
                                            </Items>
                                        </Ext:ComboBox>
                                    </Items>
                                </Ext:Panel>
                            </Ext:LayoutColumn>
                            <Ext:LayoutColumn ColumnWidth="0.6">
                                <Ext:Panel ID="panel1" runat="server" Layout="form" AutoHeight="true" Border="false">
                                    <Items>
                                        <Ext:Container ID="c1" runat="server">
                                            <Content>
                                                <uc1:PCategory ID="PCategory1" runat="server" />
                                            </Content>
                                        </Ext:Container>
                                        <Ext:CompositeField ID="CompositeField3" runat="server" Width="150">
                                            <Items>
                                                <Ext:Button ID="btnSearch" Icon="Find" runat="server" Text="查询">
                                                    <DirectEvents>
                                                        <Click OnEvent="QuickSearchButton_Click">
                                                        </Click>
                                                    </DirectEvents>
                                                </Ext:Button>
                                                <Ext:Button ID="btnReset" Icon="BookmarkGo" runat="server" Text="重置">
                                                    <DirectEvents>
                                                        <Click OnEvent="ResetButton_Click" />
                                                    </DirectEvents>
                                                </Ext:Button>
                                            </Items>
                                        </Ext:CompositeField>
                                    </Items>
                                </Ext:Panel>
                            </Ext:LayoutColumn>
                        </Columns>
                    </Ext:ColumnLayout>
                </Items>
            </Ext:Panel>
            <Ext:GridPanel ID="gpProducts" runat="server" Header="false" Border="true" TrackMouseOver="true"
                Height="300" MinHeigh="200" Region="South" AutoScroll="true">
                <TopBar>
                    <Ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <Ext:Button ID="btnAdd" runat="server" Text="选择 " Icon="TableAdd">
                            </Ext:Button>
                        </Items>
                    </Ext:Toolbar>
                </TopBar>
                <SelectionModel>
                    <Ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" runat="server" SingleSelect="true"
                        Sortable="false">
                    </Ext:CheckboxSelectionModel>
                </SelectionModel>
                <Store>
                    <Ext:Store ID="store4ProductsList" runat="server" RemoteSort="true" OnRefreshData="store4ProductsList_RefreshData">
                        <Proxy>
                            <Ext:PageProxy />
                        </Proxy>
                        <Reader>
                            <Ext:JsonReader IDProperty="ProductID">
                                <Fields>
                                    <Ext:RecordField Name="ProductID" />
                                    <Ext:RecordField Name="ProductNo" />
                                    <Ext:RecordField Name="ProductName" />
                                    <Ext:RecordField Name="ProductClass" />
                                    <Ext:RecordField Name="ProductClassDesc" />
                                    <Ext:RecordField Name="Invalid" Type="Boolean">
                                        <Convert Fn="function(value){return value?'上架':'下架';}" />
                                    </Ext:RecordField>
                                    <Ext:RecordField Name="InvalidFrom" Type="Date" />
                                    <Ext:RecordField Name="Creator" />
                                    <Ext:RecordField Name="CreateDate" Type="Date" />
                                    <Ext:RecordField Name="Modifier" />
                                    <Ext:RecordField Name="ModifyDate" Type="Date" />
                                    <Ext:RecordField Name="BasePrice" />
                                </Fields>
                            </Ext:JsonReader>
                        </Reader>
                        <BaseParams>
                            <Ext:Parameter Name="limit" Value="10" Mode="Raw" />
                            <Ext:Parameter Name="start" Value="0" Mode="Raw" />
                            <Ext:Parameter Name="dir" Value="DESC" />
                            <Ext:Parameter Name="sort" Value="ProductID" />
                        </BaseParams>
                        <SortInfo Field="ProductID" Direction="DESC" />
                    </Ext:Store>
                </Store>
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                        <Ext:RowNumbererColumn Align="Right" Resizable="false">
                        </Ext:RowNumbererColumn>
                        <Ext:Column DataIndex="ProductNo" Header="商品编号" Width="110px" />
                        <Ext:Column DataIndex="ProductName" Header="商品名称" Width="220px" />
                        <Ext:Column DataIndex="ProductClass" Header="商品类型" Width="80px">
                            <Renderer Handler="return record.get('ProductClassDesc');" />
                        </Ext:Column>
                        <Ext:Column DataIndex="Invalid" Header="是否上架" Width="60px" />
                        <Ext:DateColumn DataIndex="InvalidFrom" Header="上架日期" Width="80px" Format="yyyy-MM-dd" />
                        <Ext:Column DataIndex="BasePrice" Header="原始单价" Hidden="true" />
                    </Columns>
                </ColumnModel>
                <BottomBar>
                    <Ext:PagingToolbar ID="PagingToolbar1" runat="server" StoreID="store4ProductsList"
                        PageSize="10" />
                </BottomBar>
                <LoadMask ShowMask="true" />
            </Ext:GridPanel>
        </Items>
    </Ext:Window>
    thanks
    Last edited by geoffrey.mcgill; May 04, 2011 at 2:48 AM. Reason: [CLOSED]
  2. #2
    Hi,

    I cannot reproduce the problem, please post full test sample which reproduces the problem
  3. #3
    this problem is not be solved. the dropdownfield with treepanel is not normal in a tablepanel in IE7. but it's normal in a pure page.
    see the flow two url:

    http://admin.b2c.zcjxsoft.com/Produc...duct_List.aspx
    Click image for larger version. 

Name:	未命名.jpg 
Views:	112 
Size:	65.0 KB 
ID:	2659

    http://admin.b2c.zcjxsoft.com//Main....duct_List.aspx
    Click image for larger version. 

Name:	未命名2.jpg 
Views:	109 
Size:	29.3 KB 
ID:	2660



    they are the same on page,i think it's a bug , someting wrong for the location of the treepanel

    thanks
  4. #4
    Hi,

    I cannot reproduce it locally. Unfortunatelly, online sample doesn't help me because i cannot debug and change it
    Can you create test sample/application which reproduces the issue and can be tested locally without any changes
  5. #5
    I create a demo application , browse it in ie7, click "商品分类"

    http://admin.b2c.zcjxsoft.com/webApplication1.rar
  6. #6
    Thank you. The test project reproduces the issue. We are investigating.
  7. #7
    Hi,

    Fixed in SVN
    Please update and retest.

    If you cannot update then

    1. Add the following script to Product.aspx
        
        <script type="text/javascript">
            var fix_expand = function () {
                if (this.isExpanded() || !this.hasFocus) {
                    return;
                }
            
                if (this.first) {
                    this.doResize(this.el.getWidth() + this.getTriggerWidth());
                    delete this.first;
                } else if (this.bufferSize) {
                    this.doResize(this.bufferSize);
                    delete this.bufferSize;
                }
            
                var el = this.component.getPositionEl();
                el.setLeft(0);
                el.setTop(0);
                if(Ext.isIE6 || Ext.isIE7){
                    this.component.show();
                }
                
                el.alignTo(this.wrap, this.componentAlign);
                
                if(!(Ext.isIE6 || Ext.isIE7)){
                    this.component.show();
                }
                
                if (this.allowBlur === false) {
                    this.mon(Ext.getDoc(), { 
                        scope: this,
                        mousewheel: this.collapseIf,
                        mousedown: this.collapseIf
                    });
                }
            
                this.fireEvent("expand", this);
            };
        </script>
    
        <Ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server" Mode="Script" />
    2. Add to DropDownField
    <CustomConfig>
                    <Ext:ConfigItem Name="expand" Value="fix_expand" Mode="Raw" />
                </CustomConfig>
  8. #8
    that's fixed it ,thanks

Similar Threads

  1. Replies: 4
    Last Post: May 24, 2012, 3:08 PM
  2. [CLOSED] DataIndex on DropDownField with a TreePanel
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 18, 2011, 8:42 AM
  3. Replies: 9
    Last Post: Jul 18, 2011, 6:55 AM
  4. [CLOSED] TreePanel in a DropDownField - SetValue
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 04, 2011, 1:12 PM
  5. [CLOSED] DropDownfield TreePanel Click Listener
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 26, 2009, 2:56 AM

Posting Permissions