Now that ExtJS 4 got rid of the ColumnModel object, how do you apply default config options to all columns in a grid?
Courtesy of Stevil on the Sencha Forums:
var mygrid = Ext.create('Ext.grid.Panel', {
//... store config, other config...,
columns: {
items: [{
header: 'Kd.-Nr.',
dataIndex: 'id',
width: 65,
hidden: false
}, {
header: 'Firma',
dataIndex: 'company_name'
}],
defaults: {
sortable: true,
hidden: true,
width: 100
}
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With