[OPEN] [#242] ComboBox List Alignment

  1. #1

    [OPEN] [#242] ComboBox List Alignment

    Click image for larger version. 

Name:	CboList.png 
Views:	29 
Size:	29.8 KB 
ID:	6234Hi,

    How can I do ComboBox list alignment ?

    Thanks,

    // ------------------------------------------------------------------
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
    
        public void Page_Load(object sender, EventArgs e)
        {
    
                System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
                xmlDoc.Load(HttpContext.Current.Server.MapPath("Plants.xml"));
                System.Collections.Generic.List<object> data = new System.Collections.Generic.List<object>();
    
                IFormatProvider culture = new System.Globalization.CultureInfo("en-US", true);
    
                foreach (System.Xml.XmlNode plantNode in xmlDoc.SelectNodes("catalog/plant"))
                {
                    data.Add(new
                    {
                        Common = plantNode.SelectSingleNode("common").InnerText,
                        Botanical = plantNode.SelectSingleNode("botanical").InnerText,
                        Zone = plantNode.SelectSingleNode("zone").InnerText,
                        Light = plantNode.SelectSingleNode("light").InnerText,
                        Price = decimal.Parse(plantNode.SelectSingleNode("price").InnerText, culture),
                        Availability = DateTime.Parse(plantNode.SelectSingleNode("availability").InnerText, culture),
                        Indoor = bool.Parse(plantNode.SelectSingleNode("indoor").InnerText)
    
                    });
                }
    
                Store1.DataSource = data;
                Store1.DataBind();
    
        }
    
    </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></title>
    
        <style type="text/css">
            .search-item {
                font          : normal 11px tahoma, arial, helvetica, sans-serif;
                /*padding       : 3px 20px 3px 20px;*/
                border        : 1px solid #fff;
                border-bottom : 1px solid #eeeeee;
                white-space   : normal;
                color         : #555;
            }
            
            .search-item h3 {
                display     : block;
                font        : inherit;
                font-weight : bold;
                color       : #222;
                margin      :0px;
            }
    
            .search-item h3 span {
                float       : right;
                font-weight : normal;
                /*margin      : 0 0 5px 5px;
                width       : 100px;*/
                display     : block;
                clear       : none;
            } 
        </style>
    
    </head>
    <body>
        <form id="form1" runat="server">
           
        <ext:ResourceManager runat="server" />       
        
        <ext:FormPanel runat="server" AnchorHorizontal="100%">
        <Items>
           
            <ext:FieldContainer runat="server" Layout="HBoxLayout">
            <Items>
                <ext:DisplayField runat="server" FieldLabel="Name" />
                <ext:TextField runat="server" />
                
                <ext:DisplayField  runat="server" FieldLabel="Last Name" />
                <ext:TextField  runat="server" />
    
                <ext:DisplayField runat="server" FieldLabel="Plant" />
    
                <ext:ComboBox ID="ComboBox2" 
                runat="server" 
                DisplayField="Common" 
                ValueField="Common"
                PageSize="10"
                HideBaseTrigger="true"
                MinChars="0"
                TriggerAction="Query" 
                Flex="1">
                                    
                <ListConfig  LoadingText="Searching..." ID="lstPessoa" runat="server"  >
                    <ItemTpl ID="ItemTpl1" runat="server">
                        <Html>
                            <div class="search-item">
                                <h3><span>${Price}</span>{Common}</h3>
                                {Botanical}
                            </div>
                        </Html>
                    </ItemTpl>
                </ListConfig>
                                    
    
                            <Store>
                                <ext:Store ID="Store1" runat="server" AutoLoad="false">
                                    <Proxy>
                                        <ext:PageProxy />
                                    </Proxy>
    
                                    <Model>
                                        <ext:Model ID="Model3" runat="server">
                                            <Fields>
                                                <ext:ModelField Name="Common" />
                                                <ext:ModelField Name="Botanical" />
                                                <ext:ModelField Name="Light" />
                                                <ext:ModelField Name="Price" Type="Float" />
                                                <ext:ModelField Name="Indoor" Type="Boolean" />
                                            </Fields>
                                        </ext:Model>                            
                                    </Model>
                                </ext:Store>
                            </Store>
    
            </ext:ComboBox>                                         
            
            </Items>
            </ext:FieldContainer>
        
        </Items>
        </ext:FormPanel>
    
        </form>
    </body>
    </html>
    Last edited by Daniil; May 17, 2013 at 5:07 AM. Reason: [OPEN] [#242]
  2. #2
    Hello!

    We are investigating. Temporarily, please, add to the ComboBox right margin using MarginSpec:

    <ext:ComboBox ID="ComboBox2"
    	runat="server"
    	DisplayField="Common"
    	ValueField="Common"
    	PageSize="10"
    	HideBaseTrigger="true"
    	MinChars="0"
    	TriggerAction="Query"
    	MarginSpec="0 10 0 0"
    	Flex="1">
  3. #3
  4. #4
    Sencha have a ticket for this.

    We created an Issue to monitor.
    https://github.com/extnet/Ext.NET/issues/242
  5. #5
    Quote Originally Posted by Daniil View Post
    Sencha have a ticket for this.

    We created an Issue to monitor.
    https://github.com/extnet/Ext.NET/issues/242
    Ok, I'll wait the fix.

    Thanks

Similar Threads

  1. [FIXED] [2.1] Combobox Icon Alignment
    By prost in forum Bugs
    Replies: 1
    Last Post: Nov 24, 2012, 5:30 AM
  2. Replies: 0
    Last Post: Jun 08, 2012, 11:49 AM
  3. Combobox loses its list of items
    By PeterParsonage in forum 1.x Help
    Replies: 1
    Last Post: Feb 10, 2011, 10:46 PM
  4. [CLOSED] Combo box list alignment
    By yobnet in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 10, 2010, 6:14 AM
  5. [CLOSED] [1.0] DataPicker and ComboBox alignment issue
    By danielg in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 01, 2009, 6:30 PM

Tags for this Thread

Posting Permissions