-
13 Mar 2012 8:59 AM #21
I'll check these issues. Meanwhile, remote filtering is fixed. The infinite-scroll.html example now performs a remote filter operation on the dataset based upon a SearchField:
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Mar 2012 9:10 AM #22
Remote grouping
Remote grouping
Is it possible to implement grouping remotely like the filters and sorting? Seems like it would be possible to send the params to the server and pre group the data set. I have not seen any implementation or docs on the feature. It would give the make large data sets show much quicker if I could use it with the infinite grid with grouping.
-
13 Mar 2012 9:25 AM #23
With 4.1.0, I think the incantation would be
Where do you see destroy being called?Code:store.pageMap.clear(); // Clear all cached pages store.loadPage(1); // Start at page 1 again
The destroy method of the PagingScroller now looks like this:
Code:destroy: function() { var me = this, scrollListener = me.viewListeners.scroll; me.store.un({ guaranteedrange: me.onGuaranteedRange, scope: me }); me.view.un(me.viewListeners); if (me.view.rendered) { me.stretcher.remove(); me.view.el.un('scroll', scrollListener.fn, scrollListener.scope); } }Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Mar 2012 9:35 AM #24
It would be incredibly difficult to work.
The small subset of data in the Store might contain the last 10 rows of group A, then all of group B, then the first 10 rows of group C
You probably would not want group A's header row to be shown. How could we not render it? The store is grouped, there's a group of "A"s, so it would put a group header in.
So then when scrolling, and it gets re-rendered as the last 30 rows of group B, all of group C, and the first 5 rows of group D, what would the scrollTop of the table element have to be?
It calculates the scrollTop based upon the first store row's ordinal position in the dataset. But there may be an unknown number of group headers in the mix too which change that position.
It's all very complicated.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Mar 2012 9:38 AM #25
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Mar 2012 11:05 AM #26
Right, I've fixed that too. It will improve performance.
Now, when the table is refreshed due just to a scroll-induced re-render, it will not run a layout.
That was what was reverting the scrollLeft of the header's Box layout to zero.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Mar 2012 1:02 PM #27
-
16 Mar 2012 1:08 AM #28
Hello Animal.
Your search in infinite grid has a little problem: you cannot change your search word.
If you want to do so, you need to clear search and then search again for diffrent word.
-
16 Mar 2012 3:31 AM #29
Animal,
I think i need some help. 4.1RC1 looks good but i still have problems with buffered scrolling. If i use my old code with guaranteeRange the grid hangs and the busy dialog appears. Thats it! So i replaced guaranteeRange with loadPage but its still the same. And last try was to set autoLoad: true in the store and remove all guaranteeRange and loadPage calls. But no change. I am not using it in the standard way but it runs in 3.4 + 4.07. So could you please have a short look?
This is my store:
this is the proxy and doRequest:Code:var bufferStore = new Ext.data.Store({ id: 'bufferStore', pageSize: 100, model: 'Artikel', remoteSort: true, proxy: myProxy, buffered: true, autoLoad: true });
Maybe something with the ResultSet?Code:Ext.define('MyProxy', { extend: 'Ext.data.AjaxProxy', constructor: function(config) { MyProxy.superclass.constructor.call(this, config); this.initConfig(config); logInfo("MyProxy.constructor()"); }, doRequest: function(operation, callback, scope) { logInfo("MyProxy.doRequest() starts"); pageRequest(operation, callback, scope); logInfo("MyProxy.doRequest() ends"); return; } }); function pageRequest(operation, callback, scope) { logInfo("pageRequest(" + operation.page + ", " + operation.limit + ") starts"); findArtikel3(currentText, operation.page, operation.limit, { callback: callbackFromPageRequest.bind(this, operation, callback, scope) }); logInfo("pageRequest() ends"); } function callbackFromPageRequest(operation, callback, scope, data) { logInfo("callbackFromPageRequest(" + operation.page + ", " + operation.limit + ", " + data.length + ") starts"); try { var i, total = 0; var records = []; for(i = 0; i < data.length; i++) { records.push(Ext.ModelMgr.create(data[i], 'Artikel')); } if(data.length > 0) { total = data[0].count; // this is a helper to get total number of records } logInfo("data.length = " + data.length); logInfo("total = " + total); if(data.length > 0) { var resultSet = new Ext.data.ResultSet({ records: records, count: records.length, total: total, loaded: true, success: true }); operation.setSuccessful(true); operation.setCompleted(true); } else { var resultSet = new Ext.data.ResultSet({ records: records, count: records.length, total: total, loaded: false, success: false }); operation.setSuccessful(false); operation.setCompleted(false); } operation.resultSet = resultSet; operation.records = records; callback.bind(scope, operation)(); } catch(ex) { } logInfo("callbackFromPageRequest() ends"); }
And finally this is my grid:
As said before it runs in 4.07. I think it has to do with the proxy???Code:this.gridPanel = Ext.create('Ext.grid.Panel', { frame: true, hideCollapseTool: true, collapseDirection : 'left', collapsible : true, flex: 3, width: '100%', height: '100%', autoHeight: true, autoWidth: true, store: store, verticalScrollerType: 'paginggridscroller', verticalScroller: { numFromEdge: 5, trailingBufferZone: 10, leadingBufferZone: 20 }, loadMask: true, disableSelection: false, invalidateScrollerOnRefresh: false, columnLines: true, columns: columns, title: title, viewConfig: { stripeRows: true }, tbar: Ext.create('widget.searchtoolbar'), bbar: Ext.create('widget.slidertoolbar'), layout: { type: 'hbox', align: 'stretch' }, listeners:{ ....
I think i did all written in here:
http://www.sencha.com/forum/showthre...rolling-in-4.1
When i start the application doRequest is executed three times. So 300 records are fetched but the grid hangs (total number is 626).
Thank you!
-
18 Mar 2012 3:45 AM #30
There is no autoHeight or autoWidth config in Ext 4.1
There's no invalidateScrollerOnRefresh
There's no verticalScrollerType
To use buffered scrolling, you must give the grid a height, either by configuration or a layout of the container it is in.
Do not specify layout on a grid. It uses layout: 'fit' to fit the TableView inside it.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642


Reply With Quote


