1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Bangalore
    Posts
    95
    Vote Rating
    1
    Rameshlamani is on a distinguished road

      0  

    Default How to achieve Live Search/Filtering on Multiple Fields in the Grid using Ext.Js?

    How to achieve Live Search/Filtering on Multiple Fields in the Grid using Ext.Js?


    I have done live search on grid. it is searching based on which column i mentioned filter code. But i need to filter grid records based on multiple column search. In below code only searches name column because mentioned only the name filed in filter code. I am not getting how to achieve multiple column value search? Can any one tell me how to achieve? great appreciated. Thank you .


    Grid Code Here:


    Code:
    {
                        xtype: 'gridpanel',
                        flex: 2,
                        hidden: false,
                        store: store,
                        loadMask: true,
                        id: 'grid',
                        columns: [
                            {id:'id',header: 'ID', width: 100, sortable: true, dataIndex: 'id'},
                            {header: 'Name', width: 150, dataIndex: 'name'},
                            {header: 'Position', width: 150, dataIndex: 'position'},
                            {header: 'Ambition', width: 250, dataIndex: 'ambition'}                    
                        ],
                        stripeRows: true,               
                        title:'Straw Hats Crew',  
                    },
    liveSearch text change even Here:




    Code:
    onTextFieldChange: function(field, newValue, oldValue, options){
                var grid = Ext.getCmp('grid');
                if(newValue==''){
                    grid.store.clearFilter();
                }
                else {
                    grid.store.clearFilter();
                    grid.store.load().filter([
                        {id: 'name', property: "name", value: newValue, anyMatch: true}
                    ]);            
                }
            },

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,895
    Vote Rating
    176
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    You might look at the source on the Live Search grid example:
    http://docs.sencha.com/ext-js/4-2/#!...arch-grid.html

    The search in the example finds matches across all columns.

  3. #3
    Sencha User
    Join Date
    May 2012
    Location
    Bangalore
    Posts
    95
    Vote Rating
    1
    Rameshlamani is on a distinguished road

      0  

    Default


    k..thank you. I have achieved another way. it is working nice

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."