PDA

View Full Version : blank space in grid when scrolled to bottom and load() called on store.



Dmoney
26 Feb 2015, 8:17 AM
I have this problem in both 5 and 5.1 where if I have grid with many rows and it's scrolled to the bottom or partway down when I update the store with load(). If the new data is just a few records there is a huge whitespace in the grid and you have to scroll all the way to the bottom to see the two records.

I tried forcing doLayout etc. nothing works if scrolled to the bottom of a grid when I call load(); I get a huge whitespace in the grid. both in firefox and chrome.

Any suggestions?

yeghikyan
26 Feb 2015, 8:38 AM
Hmmm, interresant, may you show the code?

Dmoney
26 Feb 2015, 9:25 AM
There isn't much to post it's just an vbox with a couple of grids.



{
region: 'center',
margin:'10 10 10 0',
layout: {
type: 'vbox',
align: 'stretch',
pack: 'start'
},
items:[{
title: 'grid1',
xtype:'grid1',
flex:1,
collapsible:true
},{
title: 'grid2',
xtype:'grid2',
collapsible:true,
flex:1

}]
}

then this is the store load in my controller:


store = Ext.data.StoreManager.get('myStore');
proxy = store.getProxy();
proxy.extraParams.matchFilter = 'All';
// store.loadData([],false);
store.load();

yeghikyan
26 Feb 2015, 9:38 AM
I need the grids, not the vbox panel, can you reproduce it in fiddle? (https://fiddle.sencha.com/) (https://fiddle.sencha.com/)Sometimes) Sometimes in renderer of column take place js error, then you can see blank rows, the error you will not see in the dev.tool.

Dmoney
26 Feb 2015, 11:14 AM
I stripped the grid down to the minimum and I still have the issue


Ext.define('myApp.view.grids.myGridName', {
extend: 'Ext.grid.Panel',
alias: 'widget.myGridName',

store: 'myStore',
id:'myGridName',

multiSelect: false,

columnLines: true,
viewConfig: {

stripeRows: true
},

initComponent: function() {

this.columns = [

{
header: 'Primary Part No.',
dataIndex: 'primaryPartNo',
width:140,
filterable: false
// editor: {
// xtype: 'textfield'
// }
}

];

this.callParent(arguments);
}
});

yeghikyan
27 Feb 2015, 12:31 AM
Please reproduce the bug in fiddle. :D

ekrauss
19 Aug 2015, 11:58 PM
Hi Dmoney,have you fixed the problem? I have the same issue with Ext 5.1.1.

Dmoney
20 Aug 2015, 7:51 AM
@ekraussNo, I never resolved the issue, I did find some threads where the same issue was reported with the buffered grid. it was the exact same issue only they believed it to be limited to the buffered grid. and people had posted workarounds that had varying success for me. mainly capturing the scroll position of the grid before the call to the server and resetting the scroll position after the success response. I'm sorry I don't have a link to those threads but searching for whitespace/blank space and buffered grid may start you in the right direction.

If anyone does have a solution to this problem I'd be very interested as well as it's plagued me for some time and still remains a problem.

mdarretta
9 Feb 2017, 1:54 PM
was this ever resolved. i have same problem. after scrolling to the bottom of a large list of rows then reloading grid. there is large amount of blank space above rows and you have to scroll down to see rows.

Dmoney
9 Feb 2017, 3:35 PM
was this ever resolved. i have same problem. after scrolling to the bottom of a large list of rows then reloading grid. there is large amount of blank space above rows and you have to scroll down to see rows.


Try adding bufferedRenderer:false to the grid config.

mdarretta
9 Feb 2017, 3:40 PM
doesn't seem to help... i put it in the viewConfig. is that correct place?

mdarretta
9 Feb 2017, 3:44 PM
ok i put in in the create grid.panel and it WORKS! Thanks you!!! :)