Guide applies to: modern
Grid
The modern Ext.grid.Grid extends Ext.dataview.List.
Grids show a store’s data as a table of rows and columns.
Expand Code
JS Run
Ext.define('MyApp.view.Main', {
extend: 'Ext.grid.Grid',
store: {
autoLoad: true,
fields: [{name: 'dob', type: 'date', dateFormat: 'Y/m/d'}],
proxy: {type: 'ajax', url: 'resources/json/aerosmith.json'}
},
title: 'Aerosmith',
columns: [{
text: 'First Name',
dataIndex: 'first'
}, {
text: 'Last Name',
dataIndex: 'last'
}, {
text: 'Date Of Birth',
xtype: 'datecolumn',
format: 'F j, Y',
dataIndex: 'dob',
flex: 1
}]
});
Ext.application({
name: 'MyApp',
mainView: 'MyApp.view.Main'
});