Ext.define('SchoolApp.view.student.StudentGrid', {
extend: 'Ext.grid.Panel',
alias: 'widget.StudentGrid',
config: {},
constructor: function (config) {
return this.callParent(arguments);
},
selType: 'rowmodel',
columnLines: true,
selModel:
{
mode: 'SINGLE'
},
viewConfig:
{
stripeRows: true
},
bind: {
store: '{students}'
},
initComponent: function () {
Ext.apply(this, {
columns: [{
xtype: "rownumberer"
},
{
text: "Id",
dataIndex: 'Id',
hidden: true,
width: 35
},
{
text: "First Name",
flex: 1,
dataIndex: "firstName"
},
{
xtype: 'datecolumn',
text: "Birth Date",
flex: 1,
dataIndex: 'birthDate',
format: 'd-m-Y'
},
{
text: "City",
flex: 1,
dataIndex: 'city',
renderer: Ext.util.Format.uppercase
}]
});
this.callParent(arguments);
}
});