1. #31
    Ext JS Premium Member
    Join Date
    Nov 2008
    Posts
    292
    Vote Rating
    3
    wki01 is on a distinguished road

      0  

    Default


    I can not understand why, but removing this line,everything works as before.
    thanks

    Code:
                container.on('afterrender', function(cnt) {
                    //me.rowHeight = cnt.getHeight();
                    var delayedFn = function() {
                        this.resizeContainer(cnt.dataIndex);
                    };

  2. #32
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    that line try to calculate the container height on render, otherwise it's fixed to 23px, if you're using the default theme you'll not have any problems removing that line.

  3. #33
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,078
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    @ldonofrio

    It would be nice to allow for operators in numeric fields to filter:

    >50000
    <50000
    >=50000
    <=50000
    =45000

    In looking at your code, currently I could set filter: 'string' and then have the server handle the filter?

    Regards,
    Scott.

  4. #34
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    the plugin is prepared to do that, but is not complete, the only thing missing is the UI to allow operators selection.

    If you look at the code the plugin is overridding the server proxy to send "type" and "operator" properties to the server.

    If you do:
    filter: {
    type: 'int',
    operator: 'gt'
    }

    you'll receive the operator at serser side.

    Regards

  5. #35
    Touch Premium Member
    Join Date
    Nov 2011
    Location
    Bay Area
    Posts
    68
    Vote Rating
    0
    allan.ditzel is on a distinguished road

      0  

    Default


    Does anyone have a sample app/code that they can share? I've installed the plugin, but I don't see any filtering available anywhere. In the browser dev tools I can see that the filter bar js file has loaded, and also its dependency of ClearButton. I don't see any errors in the console, either.

    Thanks,

    Allan

  6. #36
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    Have you setup "filter" property for your columns?
    Start with filter: true in a column

  7. #37
    Touch Premium Member
    Join Date
    Nov 2011
    Location
    Bay Area
    Posts
    68
    Vote Rating
    0
    allan.ditzel is on a distinguished road

      0  

    Default


    When I do that now I get an error in the console saying:

    Uncaught TypeError: Object [object Object] has no method 'getEditor' on line 79359 of ext-all-debug.js and the application fails to render properly.

  8. #38
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,078
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You might want to show your code. Do you have ClearButton.js in your path for the editors?

    Code:

    Code:
    var columns = [
        { dataIndex: 'id_client', header: 'ID', width: 50, filter: 'string' },
        { dataIndex: 'last_name', header: 'Last', filter: true },
        { dataIndex: 'first_name', header: 'First', filter: true }
    ];
    Code:
    createGrid: function(){
        this.grid = Ext.create('widget.app.clients-gridclients', {
            xtype: 'app.clients-gridclients',
            id: 'grid-clients',
            region: 'center',
            plugins: [{
                ptype: 'filterbar',
                renderHidden: false,
                showClearButton: true
            }],
            store: this.store,
            border: false
        });
    
    
        // use this to load data on start
        this.on_filter_reset();
        return this.grid;
    },
    
    Regards,
    Scott.

  9. #39
    Sencha User
    Join Date
    Jun 2010
    Location
    Buenos Aires, Argentina
    Posts
    213
    Vote Rating
    9
    ldonofrio will become famous soon enough

      0  

    Default


    getEditor is not related to filterBar, maybe you have an error in your editor grid, post your code

  10. #40
    Touch Premium Member
    Join Date
    Nov 2011
    Location
    Bay Area
    Posts
    68
    Vote Rating
    0
    allan.ditzel is on a distinguished road

      0  

    Default


    Scott, thank you for the code!

    Idonofrio, here's my grid code:

    Code:
    {
                        xtype: 'gridpanel',
                        id: 'gridId',
                        store: 'datastore',
                        flex: 1,
                        viewConfig: {
    
    
                        },
                        columns: [
                            {
                                xtype: 'gridcolumn',
                                dataIndex: 'name',
                                editor: 'textfield',
                                flex: 1,
                                text: 'Name',
                                filter: 'string'
                            },
                            {
                                xtype: 'gridcolumn',
                                dataIndex: 'description',
                                editor: 'textfield',
                                flex: 1,
                                text: 'Description'
                            },
                            {
                                xtype: 'gridcolumn',
                                dataIndex: 'status',
                                text: 'Status'
                            }
                        ],
                        plugins: [
                            Ext.create('Ext.grid.plugin.RowEditing', {
    
    
                            }),
                            {
                                ptype: 'filterbar',
                                renderHidden: false,
                                showClearButton: true
                            }
                        ],
                        selModel: Ext.create('Ext.selection.CheckboxModel', {
    
    
                        })
                    }
    Setting the filter on the first column to either filter: true OR filter: 'string' yields the same error.