1. #1
    Ext User
    Join Date
    Feb 2008
    Location
    Berlin/Germany
    Posts
    97
    Vote Rating
    0
    sabiola is on a distinguished road

      0  

    Default GridFilter Extension for 3.x

    GridFilter Extension for 3.x


    Moderator edit: There's a 3.x version in svn now for those interested, click here.



    Hello,

    I create a new thread for the GridFilter Extension here, because I think the 2.0 Community Board is the wrong place to diskuss 3.x problems with this extension.

    Here is the Link to the 2.0 Community Board:
    http://www.extjs.com/forum/showthread.php?t=14503

    I wrote a Mail to the orignal author of the extension, asking for a 3.0 version.
    Here is his answer:
    Hi Stefan,

    Unfortunately the product I work on has not made the jump to 3.0 yet (and it may be some time yet), so I can't devote any time at work to updating them. Additionally, I 'gave' the Ext team ownership of the filters about a year and half ago, and I am not exactly sure who maintains it. I do remember reading that Jack was working on some "Vista Style" filters however. Sorry =\

    --Steve
    So "mjlecomte" took over the development of the Extension and asks for help:
    http://www.extjs.com/forum/showthrea...142#post345142

    I think there a lot of people waiting for a 3.x version, so lets start collecting problems...

    Greetings,
    Stefan

  2. #2
    Ext User
    Join Date
    Feb 2008
    Location
    Berlin/Germany
    Posts
    97
    Vote Rating
    0
    sabiola is on a distinguished road

      0  

    Default


    Hello,

    so, I start with two problems, we have:

    1.) I create a new filter( in my code ) for just one column of a grid, but the Filter Menu gets added to each column.
    The filter on the columns( which are not added ), seems to be a reference to the one column, that was added. When I add a filter to the column, the text of the filter textfield is displayed in the filter textfield on each column.

    2.) When a add a filter ( inside the application ), I can't remove this filter by clicking on the check box for this filter. I get this error message:
    Code:
    item.itemId is undefined
    index = cm.getIndexById(item.itemId.substr(4));
    Greetings,
    Stefan

  3. #3
    Sencha User
    Join Date
    May 2009
    Posts
    6
    Vote Rating
    0
    chaoszcat is on a distinguished road

      0  

    Default


    Quote Originally Posted by sabiola View Post
    2.) When a add a filter ( inside the application ), I can't remove this filter by clicking on the check box for this filter. I get this error message:
    Code:
    item.itemId is undefined
    index = cm.getIndexById(item.itemId.substr(4));
    The 2nd problem was solved by simonellistonball @ http://extjs.com/forum/showthread.ph...191#post338191

    Simply add on a fix.js with code: [Tested with my Extjs 3.0RC2 + GridFilter 0.2.8]
    Code:
    //Problem with GridFilter generates d.itemId undefined
    //Refer to: http://extjs.com/forum/showthread.php?p=335945#post335945
    Ext.grid.GridView.prototype.handleHdMenuClick = function(item){
        var index = this.hdCtxIndex;
        var cm = this.cm, ds = this.ds;
        switch (item.getItemId()) {
            case "asc":
                ds.sort(cm.getDataIndex(index), "ASC");
                break;
            case "desc":
                ds.sort(cm.getDataIndex(index), "DESC");
                break;
            default:
                index = cm.getIndexById(item.getItemId().substr(4));
                if (index != -1) {
                    if (item.checked && cm.getColumnsBy(this.isHideableColumn, this).length <= 1) {
                        this.onDenyColumnHide();
                        return false;
                    }
                    cm.setHidden(index, item.checked);
                }
        }
        return true;
    };
    This works for me.

    and for the problem 1, I am looking at how to solve the problem by fixing the library itself.
    Last edited by chaoszcat; 22 Jun 2009 at 2:16 AM. Reason: typo

  4. #4
    Ext User
    Join Date
    Feb 2008
    Location
    Berlin/Germany
    Posts
    97
    Vote Rating
    0
    sabiola is on a distinguished road

      0  

    Default


    Hello chaoszcat,

    thanks for your answer. This works :-)

    And this shopuld fix Bug #2:
    Code:
    Ext.ux.grid.GridFilters.prototype.onMenu = function(filterMenu){
        var filter = this.getMenuFilter();
        if(filter){
            this.menu.menu = filter.menu;
            this.menu.setChecked(filter.active, false);
        }
    
        this.menu.setVisible(filter !== undefined && filter !== null);
        this.sep.setVisible(filter !== undefined && filter !== null);
    }
    Greetings,
    Stefan

  5. #5
    Ext User tonedeaf's Avatar
    Join Date
    Dec 2007
    Posts
    137
    Vote Rating
    1
    tonedeaf is on a distinguished road

      0  

    Default


    Hi sabiola,
    I would also like to see this extension ported to ExtJS 3.0

    For 3.0 rc1, I observed an issue with the Grid Filter menu icon alignment and reported here:
    http://extjs.com/forum/showthread.ph...803#post322803

    In short, the screenshot below (in 3.0rc2) still shows a "#" symbol before the ">", "<" and "=" in the menus. I applied all the CSS fixes outlined in the forum discussion link above.

    Are you also observing this in 3.0rc2? If no, then I'll have to check my included CSS files and maybe a custom CSS rule is causing the issue in my installation.
    Attached Images

  6. #6
    Sencha User
    Join Date
    May 2009
    Posts
    6
    Vote Rating
    0
    chaoszcat is on a distinguished road

      0  

    Default


    Quote Originally Posted by tonedeaf View Post
    Hi sabiola,
    I would also like to see this extension ported to ExtJS 3.0

    For 3.0 rc1, I observed an issue with the Grid Filter menu icon alignment and reported here:
    http://extjs.com/forum/showthread.ph...803#post322803

    In short, the screenshot below (in 3.0rc2) still shows a "#" symbol before the ">", "<" and "=" in the menus. I applied all the CSS fixes outlined in the forum discussion link above.

    Are you also observing this in 3.0rc2? If no, then I'll have to check my included CSS files and maybe a custom CSS rule is causing the issue in my installation.
    I think the '#' symbol is because you haven't remove the extra icons.

    This is my solution posted not long ago. Hope that fix. Make sure your libraries are fresh, and do the fix as shown in the following link:
    http://extjs.com/forum/showthread.ph...966#post343966

  7. #7
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    I was thinking to deprecate the "filters" config option of GridFilters class, instead just grab configs from the ColumnModel.


    I think this would have a few benefits:
    1. could offer automatic filter building based on the type specified in the Column config
    2. would more easily support grid.reconfigure() and metachange event support


    So then instead of this:

    Code:
        var filters = new Ext.ux.grid.GridFilters({
            local: true, // defaults to false (remote filtering)
            filters: [{
                type: 'numeric',
                dataIndex: 'id'
            }, {
                type: 'string',
                dataIndex: 'company'
            }, {
                type: 'numeric',
                dataIndex: 'price'
            }, {
                type: 'date',
                dataIndex: 'date'
                /*
                 }, {
                 type: 'list',
                 dataIndex: 'size',
                 options: ['small', 'medium', 'large', 'extra large'],
                 phpMode: true
                 */
            }, {
                type: 'boolean',
                dataIndex: 'visible'
            }]
        });
        
        var colModel = new Ext.grid.ColumnModel({
            columns: [{
                dataIndex: 'id',
                header: 'Id'
            }, {
                dataIndex: 'company',
                header: 'Company',
                id: 'company'
            }, {
                dataIndex: 'price',
                header: 'Price'
            }, {
                dataIndex: 'date',
                header: 'Date',
                renderer: Ext.util.Format.dateRenderer('m/d/Y')
            }, {
                dataIndex: 'size',
                header: 'Size'
            }, {
                dataIndex: 'visible',
                header: 'Visible'
            }],
            defaults: {
                sortable: true
            }
        });
    You could do this:
    Code:
        var filters = new Ext.ux.grid.GridFilters({
            local: true // defaults to false (remote filtering)
        });
        
        var colModel = new Ext.grid.ColumnModel({
            columns: [{
                dataIndex: 'id',
                header: 'Id',
    
                filter: {
                    type: 'numeric',
                    // more configs here
                }
    
            }, {
                dataIndex: 'company',
                header: 'Company',
                id: 'company',
    
                filter: {
                    type: 'string',
                    // more configs here
                }
    
            }, {
                dataIndex: 'price',
                header: 'Price',
    
                filter: {
                    type: 'numeric',
                    // more configs here
                }
    
            }, {
                dataIndex: 'date',
                header: 'Date',
                renderer: Ext.util.Format.dateRenderer('m/d/Y')
                filterable: false
    
                filter: {
                    type: 'date',
                    // more configs here
                }
    
            }, {
                dataIndex: 'size',
                header: 'Size'
    
                // no filter config .... so .... no Filtering
    
            }, {
                dataIndex: 'visible',
                header: 'Visible',
    
                filter: {
                    type: 'list',
                    dataIndex: 'size',
                    options: ['small', 'medium', 'large', 'extra large'],
                    phpMode: true
                }
    
            }],
            defaults: {
                sortable: true,
                filterable: true
            }
        });
    Or just forget the "type" config in the ColumnModel and just use the "filter" config in the ColumnModel.

  8. #8
    Ext User
    Join Date
    Apr 2008
    Posts
    57
    Vote Rating
    0
    azbok is on a distinguished road

      0  

    Default Would be useful for the MetaGrid

    Would be useful for the MetaGrid


    Quote Originally Posted by mjlecomte View Post
    I was thinking to deprecate the "filters" config option of GridFilters class, instead just grab configs from the ColumnModel.

    ...
    With the MetaGrid stuff I'm working with (that you wrote), the meta data is crafted up that way - the filters are in the "fields" property which is almost directly sent to the ColumnModel. If the GridFilter works directly with the ColumnModel then I would assume there would be less special coding required in the MetaGrid.

  9. #9
    Ext User
    Join Date
    Feb 2008
    Location
    Berlin/Germany
    Posts
    97
    Vote Rating
    0
    sabiola is on a distinguished road

      0  

    Default


    @mjlecomte:

    Looks great :-)

    Stefan

  10. #10
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    13
    Vote Rating
    0
    matt4447 is on a distinguished road

      0  

    Question


    Hi everyone,

    Is there a place where I can see some full sample code of the fixed 3.0 version of the GridFilters plugin?

    I'm not quite sure I am piecing everything together, correctly, from the posts above.

    Thanks,

    Matt

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..." hd porno faketaxi