1. #101
    Ext User
    Join Date
    Apr 2010
    Location
    Orlando, FL
    Posts
    61
    Vote Rating
    0
    george4rotech is on a distinguished road

      0  

    Default


    Quote Originally Posted by george4rotech View Post
    When calling clearFilters however, although the data is reverted, the filter's input field retains the previously entered value.
    The following override is a step toward addressing this issue. A simpler (more naive?) solution would have been to call "filter.setValue('')" inside clearFilter's original "this.filters.each(function (filter) {" loop, but setValue on most of the filters (at least the ones I read) also invoked the update event, which I don't think is desirable in this case.

    Feedback appreciated.

    Code:
    (function() {
        var originalClearGridFilters = Ext.ux.grid.GridFilters.prototype.clearFilters;
        
        Ext.override(Ext.ux.grid.GridFilters, {
            clearFilters: function() {            
                originalClearGridFilters.apply(this, arguments);
                
                this.filters.each(function (filter) {
                    //prevent filter's update event from being called by setValue
                    var filterUpdateEvent = filter.events['update'];
                    delete filter.events['update'];
                    
                    filter.setValue('');
                    filter.events['update'] = filterUpdateEvent; //revert
                });
            }
        });
    }());

  2. #102
    Touch Premium Member msinn's Avatar
    Join Date
    Jul 2009
    Location
    in front of my pc
    Posts
    280
    Vote Rating
    5
    msinn is on a distinguished road

      0  

    Default


    Hello,

    would you please help me to get working the Filters on comboboxes with JsonStores?
    I have here a test-case:

    http://www.extjs.com/forum/showthread.php?101236-EditorGridPanel-Filters-don-t-apply-on-comboboxex-with-stores-Summary-Grouping-is

    Thank you a lot, a lot
    Marius
    First I would like to thank you for your time and knowledge

    Win 7 Ext JS 4.1.3 IE(6-9), FF17

  3. #103
    Sencha User
    Join Date
    Sep 2008
    Posts
    38
    Vote Rating
    0
    zeruyo is on a distinguished road

      0  

    Default


    Quote Originally Posted by george4rotech View Post
    The following override is a step toward addressing this issue. A simpler (more naive?) solution would have been to call "filter.setValue('')" inside clearFilter's original "this.filters.each(function (filter) {" loop, but setValue on most of the filters (at least the ones I read) also invoked the update event, which I don't think is desirable in this case.

    Feedback appreciated.

    Code:
    (function() {
        var originalClearGridFilters = Ext.ux.grid.GridFilters.prototype.clearFilters;
        
        Ext.override(Ext.ux.grid.GridFilters, {
            clearFilters: function() {            
                originalClearGridFilters.apply(this, arguments);
                
                this.filters.each(function (filter) {
                    //prevent filter's update event from being called by setValue
                    var filterUpdateEvent = filter.events['update'];
                    delete filter.events['update'];
                    
                    filter.setValue('');
                    filter.events['update'] = filterUpdateEvent; //revert
                });
            }
        });
    }());
    Great solution. I tried to replace the update event 'hiding' with filter.suspendEvents() but it didn't work.
    Thanks

  4. #104
    Ext User
    Join Date
    Sep 2009
    Posts
    6
    Vote Rating
    0
    Override is on a distinguished road

      0  

    Default


    Hi.
    Can you help me please: how I can submit to server value of id, not text in ListFilter?

  5. #105
    Ext User
    Join Date
    Dec 2009
    Posts
    23
    Vote Rating
    0
    asbestos girl is on a distinguished road

      0  

    Default


    Override, can you please post the relevant snippets of your code?

  6. #106
    Sencha User
    Join Date
    Nov 2008
    Posts
    60
    Vote Rating
    0
    SunWuKung is on a distinguished road

      0  

    Default filter management from menu (not column header)

    filter management from menu (not column header)


    Hi,
    I have many columns in my grid (most of them normally hidden). When I want to check if a filter on them is on/off or I want to change the filter I first need to make them visible.

    I was wondering if anybody has done some sort of filter manager eg. from a menu on the grid where the filters on the grid were listed and you could do the same functions then you do from the column header (switch on/off, change).
    If yes could you please post the sample?

    Many thanks.
    SWK

  7. #107
    Ext User
    Join Date
    Dec 2009
    Posts
    23
    Vote Rating
    0
    asbestos girl is on a distinguished road

      0  

    Default


    Hi SWK,
    I am not going to post an example as i dont have one and no time to write it, but it is definitely possible. Check out the documentation for the ux here: http://extjs-ux.org/docs/index.html, expand the menu tree there to GridFilters and Filter folders, and check out there available methods to get the data you need.

  8. #108
    Ext User
    Join Date
    Sep 2009
    Posts
    6
    Vote Rating
    0
    Override is on a distinguished road

      0  

    Default


    Quote Originally Posted by Override View Post
    Hi.
    Can you help me please: how I can submit to server value of id, not text in ListFilter?
    Quote Originally Posted by asbestos girl View Post
    Override, can you please post the relevant snippets of your code?
    Actually, can't - already resolved by changing ListMenu.js, used by ListFilter.
    By default, ListMenu creates internal store based on ListMenu.labelField property and value.id.

    Shortly about changes: valueField property added to ListMenu class, and 'valueField'-related processing added to ListView store and events.

    Solution is not tested for all cases and stores, however, it allows me to use JsonStore for ListFilter, like this:
    Code:
    new Ext.ux.grid.GridFilters(
    {
    		{
    			type: 'list',
    			dataIndex: 'AdministrativeAreaID',
    			labelField: 'Name',
    			valueField: 'ID',	//allow send value of this property to server
    			phpMode: true,
    			store: MyCache.GetStore("AdministrativeAreas") //returns new JsonStore with MemoryProxy
    		}
    }
    ...and send following data to server during grid request:
    filter[0][data][type] list
    filter[0][data][value] 4,26
    filter[0][field] AdministrativeAreaID

    Changed ListMenu.js attached.

    Thanks.
    Attached Files

  9. #109
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Midwest, USA
    Posts
    96
    Vote Rating
    2
    Reimius is on a distinguished road

      0  

    Default


    Hey guys... I ran into this huge issue (for us anyway) while using GridFilters that has an easy fix. Our business requirements have grids that require things like '%' and '$' to actually be in the store values (because the output is not only used for Extjs grids). This is easy enough to work around with data stores with the custom sorting method and grids, but this plugin did not work when a filter was set to 'numeric' and the field type in the store was set to 'string' and contained values like '25%' and such. I modified the 'validateRecord' function in the NumericFilter.js file to have the following code to make filtering work in the situation I described above. I would also appreciate people's comments if they see any potential problem with this fix or a better way to go about this, thanks.

    Code:
    validateRecord : function (record) {
            var val = (record.get(this.dataIndex) + "").replace(/([^0-9\.])/g, ""),
                values = this.getValue();
            if (values.eq !== undefined && val != values.eq) {
                return false;
            }
            if (values.lt !== undefined && val >= values.lt) {
                return false;
            }
            if (values.gt !== undefined && val <= values.gt) {
                return false;
            }
            return true;
        }
    As you can see, I'm just using a regex expression to extract the numbers and/or decimal places out of the text.

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

      0  

    Default


    Quote Originally Posted by jamie.nicholson View Post
    I have a number of re-usable stores loaded into Ext.StoreMgr and all have a storeId and are used in several places throughout an application. When I destroy the gridfilters it also takes the re-usable stores with it, which causes errors when other parts of the application try to start using the store.

    I've implemented this override to fix the problem, you might consider adding it to the sauce as normally if you create a store without a storeId you won't re-reference it and can destroy/re-create at your pleasure.

    Code:
    Ext.override(Ext.ux.menu.ListMenu,{
    destroy : function () {
    if (this.store.storeId == undefined ) {
    this.store.destroy();
    }
    Ext.ux.menu.ListMenu.superclass.destroy.call(this);
    },
    });
    true i'm usign autoDestroy flag to override
    Code:
    Ext.override(Ext.ux.menu.ListMenu, {
        destroy: function() {
            if (this.store && this.store.autoDestroy) {
                this.store.destroy();
            }
            Ext.ux.menu.ListMenu.superclass.destroy.call(this);
        }
    });

Thread Participants: 84

  1. VinylFox (1 Post)
  2. galdaka (2 Posts)
  3. Condor (10 Posts)
  4. cgi-bin (4 Posts)
  5. Fabyo (8 Posts)
  6. fshort (1 Post)
  7. digitalkaoz (1 Post)
  8. steffenk (2 Posts)
  9. brookd (1 Post)
  10. jamie.nicholson (1 Post)
  11. sawan (1 Post)
  12. froamer (1 Post)
  13. jaquet (1 Post)
  14. KevinChristensen (1 Post)
  15. bernd01 (2 Posts)
  16. tonedeaf (7 Posts)
  17. seg (1 Post)
  18. calavera (5 Posts)
  19. httpdotcom (1 Post)
  20. Timido (3 Posts)
  21. mfrancey (1 Post)
  22. WixSL (1 Post)
  23. drieraf (1 Post)
  24. nickweavers (2 Posts)
  25. goofy (1 Post)
  26. mynameisyoda (1 Post)
  27. manilodisan (1 Post)
  28. eyetv (1 Post)
  29. renoye (3 Posts)
  30. pouniok (2 Posts)
  31. mcouillard (6 Posts)
  32. Scorpie (1 Post)
  33. wiznia (1 Post)
  34. fulfowi (2 Posts)
  35. benmclendon (1 Post)
  36. roemisch (2 Posts)
  37. zeruyo (1 Post)
  38. dizor (1 Post)
  39. SunWuKung (5 Posts)
  40. mx_starter (1 Post)
  41. jimtyp (2 Posts)
  42. nitingautam (1 Post)
  43. westy (2 Posts)
  44. slemiere (1 Post)
  45. mike2406 (2 Posts)
  46. msinn (12 Posts)
  47. RanmaSaotome (1 Post)
  48. cnicolas (2 Posts)
  49. lsaffre (1 Post)
  50. astraschedule (1 Post)
  51. hankin (2 Posts)
  52. mrinaljena (1 Post)
  53. dtex-lab (1 Post)
  54. yohnan (2 Posts)
  55. Override (2 Posts)
  56. hjones (1 Post)
  57. hexawing (1 Post)
  58. taronja (6 Posts)
  59. asbestos girl (7 Posts)
  60. stalek (1 Post)
  61. mpawlowski (1 Post)
  62. DerSalz (1 Post)
  63. jimm (1 Post)
  64. blueberrymuffins (2 Posts)
  65. gleskinen (1 Post)
  66. pmdarrow (1 Post)
  67. Fallen Zen (1 Post)
  68. filippo.ferrari (6 Posts)
  69. george4rotech (2 Posts)
  70. Ebpo (1 Post)
  71. Reimius (1 Post)
  72. webtime (9 Posts)
  73. Christiand (1 Post)
  74. Oliver Specht (1 Post)
  75. novaku (1 Post)
  76. sizemorew (1 Post)
  77. # eof (1 Post)
  78. ldonofrio (3 Posts)
  79. david777 (1 Post)
  80. ExTriqui (4 Posts)
  81. leowyatt (7 Posts)
  82. JSassy (1 Post)
  83. hachie (1 Post)
  84. radmila80 (1 Post)

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