[CLOSED] Two ComboBox With ItemTpl SV:5696

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Two ComboBox With ItemTpl SV:5696

    HI, i have a problem with two combox in a form with ItemTpl:
    If insert only one combobox it's work Ok, but if insert two combobox i retrive the javascript error:

    Riga: 37
    Errore: Syntax error, unrecognized expression: form>div.\:eq(0)

    it's not possible use two combobox with ItemTpl ?

    Thanks

    Aurelio

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Store1.DataSource = new object[]
            {
                new object[]{"AL", "Alabama", "The Heart of Dixie"},
                new object[] { "AK", "Alaska", "The Land of the Midnight Sun"},
                new object[] { "AZ", "Arizona", "The Grand Canyon State"},
                new object[] { "AR", "Arkansas", "The Natural State"},
                new object[] { "CA", "California", "The Golden State"},
                
            };
    
            this.Store1.DataBind();
    
            this.Store2.DataSource = new object[]
            {
                new object[]{"AL", "Alabama", "The Heart of Dixie"},
                new object[] { "AK", "Alaska", "The Land of the Midnight Sun"},
                new object[] { "AZ", "Arizona", "The Grand Canyon State"},
                new object[] { "AR", "Arkansas", "The Natural State"},
                new object[] { "CA", "California", "The Golden State"},
                
            };
    
            this.Store2.DataBind();
        }
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
         <style>
                .search-item
                {
                font: normal 10px tahoma, arial, helvetica, sans-serif;
                padding: 3px 10px 3px 10px;
                border: 1px solid #fff;
                border-bottom: 1px solid #eeeeee;
                white-space: normal;
                color: #555;
                height: 25px;
                }
             
                .search-item h3
                {           
                margin: 0;
                }
             
                .search-item h3 col1,.search-item h3 col3
                {
                font-weight: normal;
                margin: 0 0 5px 5px;
                width: 60px;
                }
             
                .search-item h3 col2, .search-item h3 col4
                {          
                font-weight: normal;  
                margin: 0 0 5px 5px;
                width: 100%;
                }
                
            </style>
    </head>
    <body>
        <form id="form1" runat="server">
         <ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="" DirectMethodNamespace="Procedure">
                </ext:ResourceManager>
            <ext:Store ID="Store1" runat="server" IsPagingStore="true" PageSize="10">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="abbr" />
                                    <ext:ModelField Name="state" />
                                    <ext:ModelField Name="nick" />
                                </Fields>
                            </ext:Model>
                        </Model>            
                    </ext:Store>
                <ext:Store ID="Store2" runat="server" IsPagingStore="true" PageSize="10">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="abbr" />
                                    <ext:ModelField Name="state" />
                                    <ext:ModelField Name="nick" />
                                </Fields>
                            </ext:Model>
                        </Model>            
                    </ext:Store>
                <ext:Viewport ID="ViewportCon" runat="server" Layout="BorderLayout" PaddingSpec="5">
                    <Items>
                        <ext:FieldSet ID="FieldSetTestata" runat="server" Region="North" Title="Foglio" AnchorHorizontal="100%" Layout="HBoxLayout" Height="50">
                            <Items>
                                <ext:TextField ID="dspCodCan" runat="server" ReadOnly="true" FieldLabel="Cantina" LabelWidth="50" Width="150" Margins="0 50 0 0"/>
                                <ext:TextField ID="dspDatFog" runat="server" ReadOnly="true" FieldLabel="Data" LabelWidth="30" Width="150"/>
                            </Items>
                        </ext:FieldSet>
                        <ext:Panel ID="PanelMov" runat="server" Region="West" Width="300" MinWidth="100"
                                   BodyPadding="3" Layout="FitLayout" Split="true" Collapsible="true" TitleCollapse="true"
                                   Title="Movimenti cantina del giorno..." MaxWidth="700">
                            <Items>
                                <ext:GridPanel ID="GridPanelMov" runat="server" Title="Movimenti" >
                                    <ColumnModel>
                                        <Columns>
    
                                        </Columns>
                                    </ColumnModel>
                                    <SelectionModel>
    
                                    </SelectionModel>
                                </ext:GridPanel>
                            </Items>
                        </ext:Panel>
                        <ext:FormPanel ID="FormPanelMov" runat="server"  ButtonAlign="Right"
                                       BodyPadding="5" Region="Center" DefaultButton="ButtonSave" Title="Movimento..."
                                       AnchorVertical="100%" MinWidth="300" >
                           
                            <FieldDefaults LabelWidth="100" />
                           
                            <Items>
                                <ext:FieldContainer ID="FieldContainerTpl" runat="server" AnchorHorizontal="100%" Layout="HBoxLayout" Height="50">
                                    <Defaults>
                                        <ext:Parameter Name="margins" Value="0 15 0 0" Mode="Value" />
                                    </Defaults>
                                    <Items>
                                        <ext:ComboBox 
                                            ID="ComboBoxLabCamTpl" 
                                            runat="server"  AllowBlank="false" BlankText="* Natura/Tipologia obbligatoria"
                                            EmptyText="Seleziona una Natura/Tipologia"
                                            TypeAhead="true"
                                            DisplayField="state" 
                                            ValueField="abbr"
                                            MinChars="1" FieldCls="txtObbligatorioCaseSensitive"
                                            FieldLabel="Natura/Tipologia"
                                            MatchFieldWidth="false" Width="350"
                                            StoreID="Store1" >
                                            <ListConfig ItemSelector=".x-boundlist-item">
                                                <ItemTpl ID="ItemTpl1" runat="server">
                                                    <Html>
                                                        <div class="search-item">
                                                            <h3>
                                                                <col1>{abbr} - </col1>
                                                                <col2>{state}</col2>
                                                            </h3>
                                                        </div>
                                                    </Html>
                                                </ItemTpl>
                                            </ListConfig>                                        
                                        </ext:ComboBox>
                                        <ext:DisplayField runat="server" FieldLabel="Tipo" LabelWidth="15" />
                                        <ext:ComboBox 
                                            ID="ComboBoxLabCamTip" 
                                            runat="server"
                                            EmptyText="Seleziona un tipo..."
                                            TypeAhead="true"
                                            DisplayField="state" 
                                            ValueField="abbr"
                                            MinChars="1"                                      
                                            MatchFieldWidth="false"
                                            StoreID="Store2" Width="350"  >
                                            <ListConfig >
                                                <ItemTpl ID="ItemTpl2" runat="server">
                                                    <Html>
                                                        <div class="search-item">
                                                            <h3>
                                                                <col3>{abbr} - </col3>
                                                                <col4>{state}</col4>
                                                            </h3>
                                                        </div>
                                                    </Html>
                                                </ItemTpl>
                                            </ListConfig>
                                        </ext:ComboBox>                                  
                                    </Items>
                                </ext:FieldContainer>                            
                            </Items>                    
                        </ext:FormPanel>
                    </Items>
                </ext:Viewport>
    
        </form>
    </body>
    </html>
    Last edited by Daniil; Mar 04, 2014 at 10:59 AM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] How can I change fields inside <ItemTpl> in client side
    By crsodre in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 17, 2013, 9:16 PM
  2. Replies: 5
    Last Post: Mar 15, 2013, 4:24 AM
  3. [CLOSED] ItemTpl for Razor
    By gets_gui in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 30, 2012, 3:37 PM
  4. [CLOSED] V2.1 Combobox ItemTpl
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 01, 2012, 4:36 AM
  5. Replies: 4
    Last Post: Nov 30, 2011, 5:25 AM

Posting Permissions