I have 2 ExtJS model, called modelBase and modelChild. I have configured "hasMany" modelChild to the modelBase.
Ext.define('app.model.modelBase', {
extend: 'Ext.data.Model',
requires: [
'Ext.data.field.String'
],
uses: [
'app.model.modelChild'
],
fields: [{
name: 'post_code'
}, {
name: 'building_name'
}],
hasMany: {
associatedName: 'cabinet',
model: 'app.model.modelChild',
associationKey: 'cabinet'
}
});
This is the modelChild
Ext.define('app.model.modelChild', {
extend: 'Ext.data.Model',
requires: [
'Ext.data.field.Field'
],
belongsTo: 'app.model.modelBase',
fields: [{
name: 'operator'
}]
});
My question is how to display the modelChild fields (operator) in the ExtJS grid? I will have more than 1 records using the modelChild. I want to use the "rowwidget" in the ExtjS grid's plugin, but couldn't configure to display the operator (from modelChild)
I am currently using ExtJS 7.1