Reference: http://stackoverflow.com/questions/6561120/extjs-4-apply-defaults-to-all-columns-in-a-grid
1 columns: { 2 items:[ 3 { header: "ID", dataIndex: "ID"}, 4 { header: "Name", dataIndex: "Name"} 5 ], 6 defaults:{ // here, apply default config to each column 7 align: "center" 8 } 9 }
Sencha -- defaults :
This option is a means of applying default settings to all added items whether added through the items config or via the add or insert methods.
If an added item is a config object, and not an instantiated Component, then the default properties are unconditionally applied. If the added item is an instantiated Component, then the default properties are applied conditionally so as not to override existing properties in the item.
If the defaults option is specified as a function, then the function will be called using this Container as the scope (this
reference) and passing the added item as the first parameter. Any resulting object from that call is then applied to the item as default properties. ...