1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    3
    Vote Rating
    0
    matc1 is on a distinguished road

      0  

    Default list filter from remote

    list filter from remote


    Hello i'm a new user of extjs 4.1. I've aprobelm with a grid filtering.
    I use remote filter and i've a colum filter populate by remote request.
    See my picture extjs_list.png

    i define
    Code:
    var optionmsg = Ext.create('Ext.data.Store', {
            autoLoad: true,
            fields: ['id_msg','testo'],
            //model: mmsg,
            proxy: {
                    type: 'ajax',
                    url: 'server.php?q=combomsg',
                    reader: {
                            type: 'json',
                            root: 'data',
                    }
            }
    });
    then in my grid column i define filter option

    Code:
    {
            text     : 'Operazione',
            sortable : true,
            filter: {
                    type: 'list',
                    labelField: 'testo',
                    //displayField: 'testo',
                    typeAhead: true,
    
                    store: optionmsg,
                    //options: [optionmsg],
                    dataIndex: 'id_msg'
                  },
            dataIndex: 'id_msg'
    },
    My filter list is a lookpup filter list , so my label is "testo" but i have in dataabse id_msg that is a number.
    My filter list was populate correctly but when i click checkbox filter list options, on remote server id_msg is null, seem that there no id_msg value choose. So i can't filter my grid table. If i suse local data store filter list all goes well here is the
    problem?
    Thank's a lot

  2. #2
    Sencha User
    Join Date
    Sep 2010
    Posts
    3
    Vote Rating
    0
    matc1 is on a distinguished road

      0  

    Default solved

    solved


    Hello i've solved:
    I define two fields name in my store different from real db name (id_msg) like this
    Code:
    var optionmsg = Ext.create('Ext.data.Store', {
        autoLoad: true, 
        fields: ['id', 'text'],
       proxy: {
            type: 'ajax',
            url: 'server.php?q=combomsg',
            reader: {
                type: 'json',
                root: 'data'
            }
        }
    });
    and then in my grid i i set my filed filter like this
    Code:
    {
        text     : 'Operazione',
        sortable : true,
        filter: {
        type: 'list',
        labelField: 'text',
        store: optionmsg,
        phpMode: true
        },
        dataIndex: 'id_msg'
    },
    I hope this can help someone
    bye

Tags for this Thread

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