[CLOSED] filter grid with combobox column

  1. #1

    [CLOSED] filter grid with combobox column

    Hi,
    In a grid

    <Filter>
         <ext:StringFilter />
    </Filter>
    When I filter, the search is done by valuefield .
    how to filter a column of combobox by displayField ?

    <ext:Column runat="server" Text="Grupo<br/>Atendimento" Flex="2" DataIndex="TO_IDCONUNTOATENDIMENTO">
                        <Renderer Fn="rendererDescGrupoAtend" />
                        <Editor>
                            <ext:ComboBox
                                MatchFieldWidth="false"
                                runat="server"
                                ID="cbbGrupoAtendimento"
                                Width="250"
                                DisplayField="CA_DESCRICAO"
                                ValueField="CA_ID"
                                QueryMode="Local"
                                ForceSelection="true"
                                TriggerAction="All"
                                EnableKeyEvents="true"
                                EmptyText="Selecione o Grupo de atendimento">
                                <Listeners>
                                    <BeforeQuery Fn="filtrarPalavraInteira" />
                                </Listeners>
                                <Store>
                                    <ext:Store ID="StoreGrupoAtendimento" ClientIDMode="Static" IDMode="Static" DataSourceID="portalSocCa" AutoSync="true" runat="server">
                                        <Model>
                                            <ext:Model runat="server">
                                                <Fields>
                                                    <ext:ModelField Name="CA_ID" />
                                                    <ext:ModelField Name="CA_DESCRICAO" />
                                                </Fields>
                                            </ext:Model>
                                        </Model>
                                        <Listeners>
                                            <Load Handler="#{cbbGrupoAtendimento}.setValue(#{cbbGrupoAtendimento}.store.getAt(0).get('id'));" />
                                        </Listeners>
                                        <Sorters>
                                            <ext:DataSorter Property="CA_ID"></ext:DataSorter>
                                        </Sorters>
                                    </ext:Store>
                                </Store>
                                <ListConfig Width="320" Height="300" ItemSelector=".x-boundlist-item">
                                    <Tpl runat="server">
                                        <Html>
                                            <tpl for=".">
                                            <tpl if="[xindex] == 1">
                                                <table class="cbChecklist-list">
                                                    <tr>
                                                        <th>Id</th>
                                                        <th>Descrição</th>
                                                    </tr>
                                            </tpl>
                                            <tr class="x-boundlist-item">
                                                <td>{CA_ID}</td>
                                                <td>{CA_DESCRICAO}</td>
                                            </tr>
                                            <tpl if="[xcount-xindex]==0">
                                                </table>
                                            </tpl>
                                        </tpl>
                                        </Html>
                                    </Tpl>
                                </ListConfig>
                            </ext:ComboBox>
                        </Editor>
                         <Filter>
                            <ext:StringFilter />
                        </Filter>
                    </ext:Column>
    Click image for larger version. 

Name:	img1.png 
Views:	98 
Size:	59.9 KB 
ID:	24187Click image for larger version. 

Name:	img2.png 
Views:	91 
Size:	43.1 KB 
ID:	24188
    Last edited by Daniil; Sep 01, 2015 at 11:44 PM. Reason: [CLOSED]
  2. #2
    Hi @miltonfoti,

    By default, StringFilter's DataIndex equals to Column's DataIndex.

    If the GridPanel's Store contains the data (ModelField) that is used for the ComboBox's DisplayField, then:
    <ext:StringFilter DataIndex="ModelField Name of GridPanel's Store" />
  3. #3
    thank you Daniil,

    I'll try solve like that.

Similar Threads

  1. Replies: 9
    Last Post: Aug 11, 2015, 11:52 AM
  2. Replies: 13
    Last Post: Feb 28, 2013, 2:06 PM
  3. [CLOSED] Grid Column filter
    By majestic in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Nov 26, 2010, 1:35 PM
  4. [CLOSED] Add filter button to grid column header
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 08, 2009, 10:10 AM

Tags for this Thread

Posting Permissions