Threaded View

  1. #1
    Sencha User
    Join Date
    Aug 2009
    Posts
    113
    Vote Rating
    0
    lpastor is on a distinguished road

      0  

    Default Filter menu in a combo grid not populated [SOLVED]

    Filter menu in a combo grid not populated [SOLVED]


    Hello,

    I use Ext 4.1.1.

    I don't understand why my list menu ins't populated?

    bug.png

    Here are my stores :
    Code:
        var store_categorie = Ext.create('LP.store', 
            Ext.define('Categorie', {
                extend: 'Ext.data.Model',
                idProperty:  'id_categorie',
                autoLoad: true,
                remoteFilter: true,
                fields: [
                    {name: 'id_categorie', type: 'int'}, 
                    {name: 'nom_categorie'}
                ]
            }),
            {
                base: 'essai',
                table: 'categorie',
                idk: 'id_categorie'
            }
        );
    
        
        var store = Ext.create('LP.store', 
            Ext.define('Personne', {
                extend: 'Ext.data.Model',
                idProperty:  'id_personne',
                autoLoad: false,
                remoteSort: true,
                remoteFilter: true,
                remoteGroup: false,
                fields: [
                    {name: 'id_personne', type: 'int', useNull: true}, 
                    {name: 'fk_categorie_personne', type: 'int'}, 
                    {name: 'mail_personne'},
                    {name: 'prenom_personne'}, 
                    {name: 'nom_personne'}
                ],
            }),
            {
                base: 'essai',
                table: 'personne',
                idk: 'id_personne'
            }
        );
    My grid with the filter in red :
    Code:
      var Grid = Ext.create('Ext.grid.Panel',{
            iconCls: 'icon-grid',
            title: 'User List',
            flex: 1,
            store: store,
            frame: true,
            collapsible: true,
            multiSelect: true,
            plugins: [Ext.create('Ext.grid.plugin.CellEditing')],
            features: [{ftype: 'filters'}],
            columns: [
                 {
                    text: 'ID',
                    width: 40,
                    sortable: true,
                    dataIndex: 'id_personne'
                },
                {header: "Catégorie", width: 60, sortable: true, dataIndex: 'fk_categorie_personne', editor: new Ext.form.ComboBox({ 
                    typeAhead: false,
                    editable: false,
                    triggerAction: 'all',
                    //lazyRender: true,
                    queryMode: 'remote',
                    //mode: 'local',
                    store: store_categorie,
                    displayField: 'nom_categorie',
                    valueField: 'id_categorie',
                    filterable: true,
                    lastQuery: '',
                    }),renderer: 
                        function(value) {            
                            var r = store_categorie.getById(value);
                            return r ? r.get('nom_categorie') : '<?>';
                    },
                    filter: {
                        type: 'list',
                        dataIndex: 'fk_categorie_personne',
                        store: store_categorie
                        // options: [
                            // [11, 'extra small'],
                            // [18, 'small'],
                            // [22, 'medium'],
                            // [35, 'large'],
                            // [44, 'extra large']
                        // ]
                    }
                })
    ]
    });
    If I use array options, all is good.
    Last edited by lpastor; 25 Feb 2013 at 4:23 AM. Reason: SOLVED

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar