1. #1
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    7
    Vote Rating
    0
    Stepan Koci is on a distinguished road

      0  

    Question GridFilter: how to explicitly set the filter values

    GridFilter: how to explicitly set the filter values


    Hi,

    is it possible to set the values of some filter field using some function? I mean something like:

    Code:
    grid.features.filters.filter('id',300);
    I would like to invoke filtering manualy without user interaction for example after page load.

  2. #2
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    7
    Vote Rating
    0
    Stepan Koci is on a distinguished road

      0  

    Default


    Still looking for the help.
    I Can find it anywhere. Im glad for any help

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    198
    Vote Rating
    1
    Nickname is on a distinguished road

      0  

    Default


    There is the filter method. You can add the filter in the afterRender event of the gridPanel or maybe in the store load event.

    I use this in the grid panel

    Code:
    Ext.define('Webdesktop.view.administration.controllers.List', {
        extend : 'Ext.grid.Panel',
    //...
       afterRender: function() {
            var me = this;
            me.callParent();
            me.getStore().filter(
                new Ext.util.Filter({
                    filterFn: function(item) {
                        return item.data.status == 0;
                    }
                })
            );
        }
    });

  4. #4
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    7
    Vote Rating
    0
    Stepan Koci is on a distinguished road

      0  

    Smile


    Thank you!

  5. #5
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    7
    Vote Rating
    0
    Stepan Koci is on a distinguished road

      0  

    Default


    Hello again. Unfortunately that piece of code doesn't do exactly what I wanted it to. I would like to be able to set default filter options which then would be visible as if the user has set them himself (by clicking on the column dropdown and enabling the filters there). This solution did filter the grid data, but the UI did not show the respective filter as active. I have gone through the docs but did not find a way to achieve this.

  6. #6
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Montréal, Canada
    Posts
    218
    Vote Rating
    5
    Christiand is on a distinguished road

      0  

    Default


    this ux in version 3x had a method setFilterData() that is no longer available in it's 4.x incarnation. I'm trying to achieve the same thing as you but have failed for now.

  7. #7
    Sencha User
    Join Date
    Oct 2011
    Posts
    6
    Vote Rating
    0
    abs is on a distinguished road

      0  

    Default Any update on this, Can we use columnheader menu to filter in Ext JS 4

    Any update on this, Can we use columnheader menu to filter in Ext JS 4


    I have to implement a basic filter via the Column header menu on my grid. I am unable to find Ext JS 4 examples for the same, any help much appreciated!!
    Sencha docs seem to suggest to only use Store to filter and not grid (via the Column header menu). But I want the end user to key the filter values and not directly filter the store.

  8. #8
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Montréal, Canada
    Posts
    218
    Vote Rating
    5
    Christiand is on a distinguished road

      0  

  9. #9
    Sencha User
    Join Date
    Oct 2011
    Posts
    2
    Vote Rating
    0
    mmuzamil is on a distinguished road

      0  

    Default Any update?

    Any update?


    I am also trying to achieve this, any update on this one?

  10. #10
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    7
    Vote Rating
    0
    Stepan Koci is on a distinguished road

      0  

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