Grid.hideHeader bug
hideHeaders causes "Layout run failed" with 4.2.1 (not 4.2.0!)
HTML
<script src="http://cdn.sencha.com/ext/gpl/4.2.1/ext-all-dev.js"></script>
CSS
@import 'http://cdn.sencha.io/ext/gpl/4.2.1/resources/ext-theme-neptune/ext-theme-neptune-all.css'
JavaScript
var DATA = [
['S', 'Shares total', 139122.83, 13874.98],
['CB', 'Cash Balance', 74847.33, 1069.32],
['P', 'Portfolio', 213970.16, 14944.3],
['B', 'Benchmark', 219206.95, 20181.09]
];
Ext.define('PerformanceGridModel', {
extend: 'Ext.data.Model',
fields: [
{ name: 'ShareCode', type: 'string', useNull: true },
{ name: 'ShareName', type: 'string', useNull: true },
{ name: 'ValueHeld_End', type: 'number', useNull: true },
{ name: 'TotalPnL', type: 'number', useNull: true },
]
});
Ext.onReady(function () {
var store = Ext.create('Ext.data.ArrayStore', {
model: 'PerformanceGridModel',
data: DATA,
autoLoad: true
});
Ext.create('Ext.grid.Panel', {
renderTo: Ext.getBody(),
width: 800,
height: 600,
title: 'Performance',
store: store,
viewConfig: {
stripeRows: true
},
columns: [{
text: 'Code',
width: 60,
dataIndex: 'ShareCode'
}, {
text: 'Share',
width: 100,
dataIndex: 'ShareName'
}, {
text: 'Close',
columns: [{
text: 'Value',
width: 90,
dataIndex: 'ValueHeld_End'
}, {
text: 'Total Profit/(loss)',
width: 120,
dataIndex: 'TotalPnL'
}]
}]
});
});