PDA

View Full Version : No scrollbar and paging toolbar in grid inside window help



arpho
25 Sep 2011, 4:17 AM
I have a grid inside a window, if i use renderto 'something' it works perfectly, when it is inside a window: scrolbar and paging toolbar disapear; this is my window definition with the grid


var window = new Ext.Window({
height: 450, width: 700,
title: 'Centri estetici di '+provincie[pr],
draggable : true,
resizeble: true,
id:'gridWiever'+countViewer,




items: new Ext.grid.Panel({

store: SpaStore,
stateful: true,
stateId: 'stateGrid',
dockedItems: [{
xtype: 'pagingtoolbar',
store: SpaStore,
dock: 'bottom',
displayInfo: true,
stripeRows:true,
resizeble:true,
draggable: true,


}],
columns: [
{
text : 'nome1',
flex : 1,
sortable : false,
dataIndex: 'nome1'
},
{
text : 'nome2',
width : 1,
sortable : true,
// renderer : 'usMoney',
dataIndex: 'nome2'
},
{
text : 'indirizzo',
width : 75,
sortable : true,
// renderer : change,
dataIndex: 'indirizzo'
},{
text : 'comune',
width : 75,
sortable : true,
//renderer : pctChange,
dataIndex: 'comune'
},
{
text : 'provincia',
width : 85,
sortable : true,
dataIndex: 'provincia'
},]}

,floater = Ext.create('Ext.Component', {
xtype: 'component',
floating: {
shadow: false
},
height: 50,
width: 50,
x: 175,
y: 75
}), {
border: false
})



,
buttons : [
{
text: 'Close',
handler : function(btn){
//Ext.Msg.alert('dblclick','hai premuto ok');
w.close();




}
}
]
});



I do not know what is wrong
any help is apreciated, thanks in advance

tvanzoelen
25 Sep 2011, 7:25 AM
What if you provide autoScroll:true on the grid?

Else maybe it is related to this problem, http://www.sencha.com/forum/showthread.php?148111-Grid-columns-not-scrolling-in-Sync.-Scope-Problem

I ve no scrolls either if the grid is out of the scope of the viewport.

arpho
25 Sep 2011, 11:16 PM
Thanks I solved, now it works, I forgot layout:'fit' in the definition of the window