[CLOSED] [0.8.2] Render problem after displaying a hidden combobox

  1. #1

    [CLOSED] [0.8.2] Render problem after displaying a hidden combobox

    Hi:

    It's a problem of Coolite 0.8.2. We put a combobox into a hidden panel and display it while clicking a button. but the combobox doesn't render correctly.
    That's the example code, please have a look:


    
    
    <%@ Page Language="C#" %>
    
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <%@ Register Assembly="Coolite.Ext.UX" Namespace="Coolite.Ext.UX" TagPrefix="ux" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
    
    
        }
    
    
        protected void btnDisplay_Click(object sender, AjaxEventArgs e)
        {
            panl.Show();
        }
    
    
        protected void btnHide_Click(object sender, AjaxEventArgs e)
        {
            panl.Hide();
        }
    </script>
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title> </title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server" />
        <table  width="100%">
        <tr>
        <td>
         <ext:Button runat="server" ID="btnDisplay" Text="Display">
            <AjaxEvents>
                <Click OnEvent="btnDisplay_Click">
                </Click>
            </AjaxEvents>
        </ext:Button>
        </td> 
        </tr>
         <tr>
        <td   colspan="2">
        <ext:Panel runat="server" ID="panl" Hidden="true" BodyBorder="false" AutoRender="true">
            <Body> 
                <ext:ComboBox runat="server" ID="cbxModel" TypeAhead="true" Mode="Local"  
                    ForceSelection="true" TriggerAction="All" AutoRender="true" AllowDomMove="false" >
                    <Items>
                        <ext:ListItem Text="test" Value="2" />
                        <ext:ListItem Text="test1" Value="3" />
                        <ext:ListItem Text="test3" Value="5" />
                    </Items> 
               </ext:ComboBox>
            </Body>
        </ext:Panel>
        </td>
        </tr>
        </table> 
        </form>
    </body>
    </html>

    and the screen shot of error render is also attached.
    Please advise how to workaround the problem, thanks a lot.


    Charlie
    Development team of Webezi Software






  2. #2

    RE: [CLOSED] [0.8.2] Render problem after displaying a hidden combobox

    Hi Charlie,

    Can you try calling .SyncSize() on the ComboBox, just after your call to panl.Show();.


    Another option which I think should work is placing an <ext:ContainerLayout> inside the Panel <Body>, then placing the <ext:ComboBox> inside the ContainerLayout.


    Hope this helps.


    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] [0.8.2] Render problem after displaying a hidden combobox

    Thank you, Geoffrey. It works.

    <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 12px; font-family: inherit; vertical-align: baseline; color: rgb(51, 51, 51); ">Charlie
    <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 12px; font-family: inherit; vertical-align: baseline; color: rgb(51, 51, 51); ">Development team of Webezi Software

Similar Threads

  1. [CLOSED] Render FileUploadField on hidden panel JS error
    By bakardi in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 17, 2012, 6:46 PM
  2. [CLOSED] GridPanel does not render when inside hidden container
    By jjones in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 01, 2011, 9:13 PM
  3. [CLOSED] Hidden Fields, SqlDataSource, ComboBox Update Grid Problem
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 24, 2010, 4:06 PM
  4. [CLOSED] hidden tab panels not displaying correctly
    By jeremyl in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 29, 2010, 4:18 AM

Posting Permissions