[CLOSED] DropDownField with Grow="true" and GrowMax="xxx"

  1. #1

    [CLOSED] DropDownField with Grow="true" and GrowMax="xxx"

    Hi,

    When an item with a longer name is selected - the DropDownField grows to its size tu display the value correctly.

    My question is how to invoke this on a first load? I've set the value in code behind but the width is not adjusted.


    Thx.
    Last edited by Daniil; Jan 12, 2012 at 12:22 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I was unable to reproduce the problem using the example below - a DropDownField grows at the initial load.

    Please provide your test case.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                StringBuilder text = new StringBuilder();
                for (int i = 0; i < 25; i++) 
                {
                    text.Append("test ");
                }
                this.DropDownField1.Text = text.ToString();
            }
        }
    </script>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:DropDownField ID="DropDownField1" runat="server" Grow="true">
                <Component>
                    <ext:Panel runat="server" />
                </Component>
            </ext:DropDownField>
        </form>
    </body>
    </html>
  3. #3
    yes, there are no issues in your example, anyway in mine situation where having a TreePanl inside a DropDownField after the AjaxRequest the width was not OK.

    In short this is what I was looking for:
    DropDownField1.autoSize()
    If I put it in InstanceScript works fine.


    Thx
  4. #4
    Please clarify can we mark the thread as closed?
  5. #5
    Yes, go ahead and close it.

Similar Threads

  1. [CLOSED] How does "MaskCls" work for "AutoLoad" mask in panel control
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 19, 2012, 12:09 PM
  2. Replies: 1
    Last Post: Jun 26, 2012, 11:29 AM
  3. [CLOSED] Hidden="true" behaves as Visible="false"
    By marco.morreale in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: May 28, 2012, 3:17 PM
  4. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  5. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM

Tags for this Thread

Posting Permissions