PDA

View Full Version : scroll && locked column



Ex_Soft
20 Jun 2012, 5:39 AM
The scroll disappeared, when I've set locked property for a column


var
createData = function(max) {
var
data = [];

for(var i=0; i<max; ++i)
data.push( { id: i, name: "Record# "+i } );

return data;
},
store = Ext.create("Ext.data.Store", {
fields: [
{ name: "id", type: "int" },
"name"
],
data: createData(1000)
}),
grid = Ext.create("Ext.grid.Panel", {
store: store,
columns: [
{ dataIndex: "id", header: "id" /*, width: 100 */ /*, locked: true */ },
{ dataIndex: "name", header: "name"/*, width: 100 */ /*, locked: true */ }
]
//, autoScroll: true
}),
w = Ext.create("Ext.window.Window", {
layout: "fit",
height: 200,
width: 300,
items: [grid]
});

w.show();

How to restore scroll?

scottmartin
20 Jun 2012, 12:06 PM
What is the exact version of ExtJS4 that you are using? Have you tried this with 4.1.1 RC2?

Scott.

Ex_Soft
20 Jun 2012, 9:49 PM
What is the exact version of ExtJS4 that you are using?
4.0.7

Have you tried this with 4.1.1 RC2?
Doesn't work too.

scottmartin
25 Jun 2012, 4:02 PM
Are you referring to when you lock both columns?

The locking grid actually creates 2 grids ..
the scrolling is created for the right side grid( or you would have 2 scrollbars)

The solution would be not to lock all of your columns.

Scott.

Ex_Soft
25 Jun 2012, 11:43 PM
The locking grid actually creates 2 grids ..
the scrolling is created for the right side grid
THNX