[OPEN] XTemplate+ComboBox Can't be used in Column Editor

  1. #1

    [OPEN] XTemplate+ComboBox Can't be used in Column Editor

    I can't apply XTemplate in Editor ComboBox .

    But the same code does work when not in Column Editor.


    <ext:GridPanel runat="server" ID="GridPanel_RuKuMingXi" Title="GridPanel_RuKuMingXi" 
                            StoreID="Store1" Icon="Lorry" Header="false" Border="false">
                            <ColumnModel ID="ColumnModel1" runat="server">
                                <Columns>
                                    <ext:Column ColumnID="company" DataIndex="company" Header="company">
                                        <Renderer Fn="companyRender" />
                                        <Editor>
                                                <ext:ComboBox 
                                                        ID="ComboBox2"
                                                        runat="server" 
                                                        StoreID="Store2"
                                                        DisplayField="company" 
                                                        ValueField="company"
                                                        TypeAhead="false"
                                                        LoadingText="Searching..." 
                                                        Width="570"
                                                        ListWidth="900"
                                                        HideTrigger="true"    
                                                        TriggerAction="All"
                                                        Mode="Remote"
                                                        Select&#111;nfocus="true"
                                                        ItemSelector="div.search-item"
                                                        >
                                                        <Template runat="server">
                                                           <tpl for=".">
                                                              <div class="search-item">
                                                                1111111111111
                                                              
    
                                                           </tpl>
                                                        </Template>
                                             </ext:ComboBox>  
                                        </Editor>
                                    </ext:Column>
                                </Columns>
                            </ColumnModel>
                            </ext:GridPanel>
  2. #2

    RE: [OPEN] XTemplate+ComboBox Can't be used in Column Editor

    Hi,

    Yes, there is a problem with it.

    I can suggest nexrt work-around

    1. Define manually XTemplate before grid (XTemplate can be invisible for intellisense, it's ok, don't confuse)

    <ext:XTemplate ID="Tpl1" runat="server">
        <tpl for=".">
          <div class="search-item">
            {text}
          
    
       </tpl>
    </ext:XTemplate>
    2. Then define this template in combo

    <ext:ComboBox  ID="cbStates"
          runat="server"                                                               
          ItemSelector="div.search-item"
          >
         <CustomConfig>
              <ext:ConfigItem Name="tpl" Value="#{Tpl1}" Mode="Raw" />
         </CustomConfig>
    </ext:ComboBox>
  3. #3

    RE: [OPEN] XTemplate+ComboBox Can't be used in Column Editor

    besides, coolite can't set xtemplate in code-behind, it's read-only.
  4. #4

    RE: [OPEN] XTemplate+ComboBox Can't be used in Column Editor

    Hi,

    Read-only instance of Template but you can change properties


    ComboBox1.Template.Text = "<tpl ....";

Similar Threads

  1. Replies: 14
    Last Post: Aug 18, 2016, 1:57 AM
  2. Replies: 1
    Last Post: Feb 19, 2012, 1:07 PM
  3. [CLOSED] gridpanel with combobox column editor
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 30, 2011, 6:53 PM
  4. [CLOSED] [1.0] ComboBox Editor bound to another Column
    By edigital in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 06, 2010, 12:29 PM
  5. Combobox XTemplate- Getting 3rd Column
    By danni in forum 1.x Help
    Replies: 0
    Last Post: Sep 12, 2009, 7:31 AM

Posting Permissions