PDA

View Full Version : [SOLVED] Two Ext.ux.grid.BufferView in two tabs gives an error



Pachat
15 Jan 2010, 6:30 AM
Hi,

I'm using BufferView.js and it works great on the grid of my first tab


var tableRemote = new Ext.grid.GridPanel({
title:'Employés',
store: storeTableRemote,
region:'center',
view: new Ext.ux.grid.BufferView({
scrollDelay: false
}),
When invoked in a second tab, no data shows and Firebug says :

this.getRow(i) is undefined
this.getRow(i).innerHTML = html;\n BufferView.js (ligne 178)
Note that without BufferView the second tab correctly shows the data (of course after waiting, which is what I want to avoid)

in BufferView.js we have :

doUpdate: function(){
169 if (this.getVisibleRowCount() > 0) {
170 var g = this.grid, cm = g.colModel, ds = g.store;
171 var cs = this.getColumnData();
172
173 var vr = this.getVisibleRows();
174 for (var i = vr.first; i <= vr.last; i++) {
175 // if row is NOT rendered and is visible, render it
176 if(!this.isRowRendered(i)){
177 var html = this.doRender(cs, [ds.getAt(i)], ds, i, cm.getColumnCount(), g.stripeRows, true);
178 this.getRow(i).innerHTML = html;
179 }
180 }
181 this.clean();
182 }
183 }, How can I use the BufferView in different tabs of my TabPanel ?

Pachat
16 Jan 2010, 8:15 AM
When I show Tab 2 first, the problem jumps to Tab 1 and the second table that did not show any row now shows them properly. Hence, the first table that is now on the second tab does not show any rows anymore.

So it clearly shows that it is something in the BufferView that does is not properly relinked when changing tab. In particular, it looks like that the ds (datastore) is still the one of the graid on hte first tab.

How can I link the BufferView to the right "ds" while changing tabs ?

Pachat
16 Jan 2010, 12:58 PM
A bug that has not been corrected in the final release dispite the solution here (https://www.extjs.com/forum/showthread.php?p=428086#post428086)