1. #41
    Ext User
    Join Date
    Jun 2009
    Posts
    3
    Vote Rating
    0
    ecalo is on a distinguished road

      0  

    Default


    What a great plugin. I'm a newbie to ExtJS, I tried experimenting on this plugin and found a bug: When you reorder the columns, the grid store will reload TWICE. I have no idea where and how to fix this. It's annoying since it will contact the server twice.

  2. #42
    Sencha Premium Member d.zucconi's Avatar
    Join Date
    Jun 2008
    Location
    Piacenza (Italy)
    Posts
    78
    Vote Rating
    5
    d.zucconi is on a distinguished road

      0  

    Default


    Quote Originally Posted by ecalo View Post
    When you reorder the columns, the grid store will reload TWICE.
    This was a known bug... I suppose that was already fixed with latest released version (1.0.6).
    What version have you tested ?

  3. #43
    Ext User
    Join Date
    Jun 2009
    Posts
    3
    Vote Rating
    0
    ecalo is on a distinguished road

      0  

    Default


    I just copied your code found in the first page.

  4. #44
    Sencha Premium Member d.zucconi's Avatar
    Join Date
    Jun 2008
    Location
    Piacenza (Italy)
    Posts
    78
    Vote Rating
    5
    d.zucconi is on a distinguished road

      0  

    Talking


    Quote Originally Posted by ecalo View Post
    I just copied your code found in the first page.
    Sorry, the fix for this bug is only included in the latest version (1.0.9) .
    So I've updated the first page with my latest plugin version. Try to update and check if now the problem is solved.

  5. #45
    Ext User
    Join Date
    Jun 2009
    Posts
    3
    Vote Rating
    0
    ecalo is on a distinguished road

      0  

    Default


    Quote Originally Posted by d.zucconi View Post
    Sorry, the fix for this bug is only included in the latest version (1.0.9) .
    So I've updated the first page with my latest plugin version. Try to update and check if now the problem is solved.
    Very nice! The bug is now fixed. Thanks a lot.

  6. #46
    Sencha User nickweavers's Avatar
    Join Date
    Feb 2008
    Posts
    106
    Vote Rating
    0
    nickweavers is on a distinguished road

      0  

    Default


    When I use this plugin in my grid, this is an example of what I get posted to me at the server (since my store has other baseParams)
    Code:
    controller      opsuk_admin
    first_name	John
    last_name	Weaver
    limit	        5
    start	        0
    task	        employee_records
    view            main
    Currently, for the server side PHP to determine which are column filters, it has to have a knowledge of either what the dataindex names are (loop using inclusion) or what they are not (loop using exclusion). In either case, if fields are added or removed, the inclusion or exclusion set used to check against must be updated.

    It would be helpful if the filter parms could be differentiated by prefixing them with string such as FILTER_ so that the server side PHP could recognise them easily and construct the WHERE clause more simply. This way, all the PHP has to "know" is the name of the prefix (which could be hard coded or passed as another baseParam).
    Code:
    controller      opsuk_admin
    FILTER_first_name	John
    FILTER_last_name	Weaver
    limit	        5
    start	        0
    task	        employee_records
    view            main
    I am an ExtJs newcomer, so could someone tell me if this would be simple mod I could do myself, and if so, could you please give me some clues as to where to start looking.

    Many thanks,
    Nick.
    Last edited by nickweavers; 9 Nov 2009 at 3:48 PM. Reason: correction

  7. #47
    Touch Premium Member
    Join Date
    Jun 2008
    Location
    Germany, Dortmund
    Posts
    249
    Vote Rating
    12
    hschaefer123 will become famous soon enough

      0  

    Default Using FilterParams as Object

    Using FilterParams as Object


    Hi Nick,
    i am using a DirectStore Implementation that forces to have a known amount of
    baseParams like start, limit, sort, sortdir, filters[]

    For this reason, i modified the plugin a little bit (code is from 1.0.6, because i've problems with 1.0.9)
    Code:
    applyFilter: function(el, bLoad)
    ...
            if(Ext.isEmpty(sValue))
            {
                //delete this.grid.store.baseParams[el.filterName];
                delete this.filters[el.filterName];
            }
            else    
            {
                //this.grid.store.baseParams[el.filterName] = sValue;
                this.filters[el.filterName] = sValue;
    ...
    ################################################
    Code:
    applyFilters: function(bLoad)
        {
            if(arguments.length < 1)
                bLoad = true;
            for(var fn in this.filterFields)
            {
                this.applyFilter(this.filterFields[fn], false);
            }
            // CHANGE: attach all filters to one param
            this.grid.store.baseParams['filters'] =  this.filters;
            if(bLoad)
                this.storeReload();
        },
    ################################################

    This is only a dirt example, but make this feature configurable would
    be a great benefit for the plugin.

    It is a must have for DirectStore implementations, where Post Params
    are Mapped to Remote Classes with known Constructors.
    Inside Ext, also the param order is hardcoded
    ---
    Inside Store
    Code:
    ,directFn: Adresse.find
    ,paramOrder: ['start', 'limit', 'sort', 'dir', 'filters']
    so any unknown param won't be seen by the remote function!

    For this reason, a posted filter list via name is not possible.

    Also Saki's Search Extension and some other plugs are using this technique.

    Maybe Mr. Zucconi can implement this feature in a next release.

    Best wishes,
    Holger
    Last edited by mystix; 12 Feb 2010 at 8:17 AM. Reason: POST CODE IN [code][/code] TAGS. see http://extjs.com/forum/misc.php?do=bbcode#code

  8. #48
    Sencha User
    Join Date
    Feb 2010
    Posts
    17
    Vote Rating
    0
    taron133 is on a distinguished road

      0  

    Default hide/show columns

    hide/show columns


    Columns width is crash if switch hide/show columns in grid.

    If "viewConfig:{autoFill:true,forceFit:true}" - columns width is bad.
    If element was hidden:true, and at some moment will be show() - filter not display.

    storeReload not work, because of "this.grid.store.lastOptions" (undefined).
    "this.grid.store.baseParams" needed may be.

    Needed:
    change: function(field, value){
    if (value != field.value) this.applyFilter(field);
    }
    for optimization

    My Ext:3x

  9. #49
    Sencha User
    Join Date
    Feb 2010
    Posts
    7
    Vote Rating
    0
    kdeelstra is on a distinguished road

      0  

    Default link demo not ok?

    link demo not ok?


    Live Demo
    http://84.253.168.37:8090/w2p/docs.html

    this link is not working...

  10. #50
    Sencha User
    Join Date
    Sep 2009
    Posts
    9
    Vote Rating
    0
    ob1 is on a distinguished road

      0  

    Default Bug ? Showing an initially hidden column, the filter box doesn't appear

    Bug ? Showing an initially hidden column, the filter box doesn't appear


    Hi,

    Tested with Ext versions 3.0-3.1.1 and plugin versions 1.0.5/1.0.9.

    I start up my grid with several columns hidden (by calling "ColumnModel.setHidden").
    Now, when making these columns visible by using the grid header menu, the columns appear but without the filter.

    Some debugging showed me that inside "onColHidden" you do "panel.doLayout();" which returns pretty early since "canLayout" returns false.

    Possible solution - calling "panel.doLayout" with the "force" parameter = "true" works for me.
    Not sure this is the best solution, as I didn't dig deep to really understand the problem, but thought I'd share what I have.

    Thanks for the great plugin