-
13 Mar 2013 4:26 AM #131
FilterBar + Bufferd Store + Memory Proxy
The FilterBar feature searchs only in the current page not in all pages!
Thankyou.
Code:Code:var store = Ext.create('Ext.data.Store', { model : 'Mediciones', remoteSort : false, remoteFilter : false, autoDestroy : true, autoLoad : false, pageSize : 100, buffered: true, proxy : { type : 'memory',//'pagingmemory', reader : { type : 'json', root : 'list' } } });
-
13 Mar 2013 5:22 AM #132
in buffered store the store have only the loaded page of records so the plugin can't have access to the entire dataset. Maybe you have to load all pages first.
-
13 Mar 2013 9:32 AM #133
I found the fix. The bug is in the method filter of the Store.
My solution in green.
Code:filter: function(filters, value) { if (Ext.isString(filters)) { filters = { property: filters, value: value }; } var me = this, decoded = me.decodeFilters(filters), i = 0, doLocalSort = me.sorters.length && me.sortOnFilter && !me.remoteSort, length = decoded.length; for (; i < length; i++) { me.filters.replace(decoded[i]); } if (me.remoteFilter) { delete me.totalCount; if (me.buffered) { me.pageMap.clear(); me.loadPage(1); } else { me.currentPage = 1; me.load(); } } else { if (me.filters.getCount()) { me.snapshot = me.snapshot || me.data.clone(); if(me.proxy.type != 'pagingmemory'){ me.data = me.data.filter(me.filters.items); } else{ var list = new Ext.util.MixedCollection(), items = Ext.Array.clone(me.proxy.data); for(i=0;i<items.length;i++){ list.add(Ext.create(me.model,items[i])); } me.data = list.filter(me.filters.items); } if (doLocalSort) { me.sort(); } else { me.fireEvent('datachanged', me); me.fireEvent('refresh', me); } } } },
-
15 Mar 2013 5:29 AM #134
Trying out this great plugin with the recently released 4.2.0.663, there is compatibility issue: in a few places it calls
, where in previous versions of ExtJS thatCode:me.grid.headerCt.getGridColumns(true)
meant refresh the cache.Code:true
Current version of that method does not accept the flag anymore, its only arguments are declared private... and thus an error is raised about “result.push() is not a function”, in grid/header/Container.js at line 883.
As a quick fix, simply removing the parameter let me go further in my tests.
-
15 Mar 2013 6:57 AM #135
thanks lelit, i've noted that too
-
18 Mar 2013 10:11 PM #136
Setting width issue
Setting width issue
When setting a column width, the filterbar field for that column is not being initially rendered. However, flexes work fine.
Has anyone else experienced this problem (and got a possible solution/explanation)?
Code:plugins: [{ ptype: 'filterbar', renderHidden: false, showShowHideButton: true, showClearAllButton: true }],Behavior:Code:{ xtype: 'gridcolumn', dataIndex: 'name', width: 200, text: 'Role', filter: true },
The filter bar is initially hidden when the grid's backing store is loading (ajax load). Once loaded, the filterbar shows and the filters on columns with specified widths are not rendered. A hide, then show (using the show/hide icon) renders the fields correctly.
-
19 Mar 2013 12:54 AM #137
trainings / workshops / consulting: Sencha Touch / Ext JS
Profile on SenchaDevs
www: http://www.nils-dehl.de
twitter: nilsdehl
meetup: Sencha Touch / Ext JS Meetup Frankfurt
videos: http://vimeo.com/album/1621422
conference photos: http://www.flickr.com/photos/nils-dehl/
-
21 Mar 2013 12:53 AM #138
-
21 Mar 2013 1:22 AM #139
Search the file also for just
than you should find one more and it should workHTML Code:.getGridColumns(true)
trainings / workshops / consulting: Sencha Touch / Ext JS
Profile on SenchaDevs
www: http://www.nils-dehl.de
twitter: nilsdehl
meetup: Sencha Touch / Ext JS Meetup Frankfurt
videos: http://vimeo.com/album/1621422
conference photos: http://www.flickr.com/photos/nils-dehl/
-
24 Mar 2013 10:06 PM #140
any update for ExtJS 4.2?
Thanks!


Reply With Quote