PDA

View Full Version : Window header corrupts after using grid horizontal scroll



shav
18 Oct 2013, 5:59 AM
Hi All,
The issue I want to describe is similar to this:
http://www.sencha.com/forum/archive/index.php/t-253922.html?

After opening a window and horizontally scrolling the grid inside of it, I close and re-open that window and get a corrupted header. Is it possible to do something?

Thanks in advance.

Gary Schlosberg
18 Oct 2013, 8:11 AM
Looks like they were having a difficult time reproducing it.
http://www.sencha.com/forum/showthread.php?253922

Can you please post a runnable test case which exhibits this issue? Thanks.

shav
25 Oct 2013, 12:11 AM
Here is an example code:


Ext.define('Company', {
extend: 'Ext.data.Model',
fields: [
{name: 'company'},
{name: 'price'},
{name: 'change'},
{name: 'pctChange'},
{name: 'lastChange'},
{name: 'last'},
{name: 'Change'},
{name: 'test'}
]
});
var myData = [
['3m Co', 71.72, 0.02, 0.03, '9/1 12:00am'],
['Alcoa Inc', 29.01, 0.42, 1.47, '9/1 12:00am'],
['Altria Group Inc', 83.81, 0.28, 0.34, '9/1 12:00am'],
['American Express Company', 52.55, 0.01, 0.02, '9/1 12:00am'],
['American International Group, Inc.', 64.13, 0.31, 0.49, '9/1 12:00am'],
['AT&T Inc.', 31.61, -0.48, -1.54, '9/1 12:00am'],
['Boeing Co.', 75.43, 0.53, 0.71, '9/1 12:00am'],
['Caterpillar Inc.', 67.27, 0.92, 1.39, '9/1 12:00am'],
['Citigroup, Inc.', 49.37, 0.02, 0.04, '9/1 12:00am'],
['E.I. du Pont de Nemours and Company', 40.48, 0.51, 1.28, '9/1 12:00am']
];

Ext.onReady(function() {
var cols = [
{
text : 'Company',
dataIndex: 'company'
},
{
text : 'Price',
dataIndex: 'price'
},
{
text : 'Change',
dataIndex: 'change'
},
{
text : '% Change',
dataIndex: 'pctChange'
},
{
text : 'Last Updated',
dataIndex: 'lastChange'
}
];

var btn = new Ext.button.Button({
renderTo: Ext.getBody(),
text: 'test',
listeners: {
click: function(btn) {
var win = new Ext.window.Window({
title: "Test",
constrain: true,
height: 300,
width: 400,
closable: true,
modal: false,
autoScroll: true,
items: [new Ext.grid.Panel({
columns: cols,
store: new Ext.data.Store({
model: 'Company',
data: myData
}),
autoScroll: true,
columnLines: true
})],
listeners: {
resize: function(win) {
win.doLayout();
}
}
});
win.showAt(300, 220);
}
}
});
});

Gary Schlosberg
25 Oct 2013, 3:46 PM
I put your code into this Fiddle:
https://fiddle.sencha.com/#fiddle/17d

I haven't been able to reproduce the corrupted headers, which I assume should look something like the images in the thread you referenced. With what browsers and operating system have you seen this issue?