I have two models, Vendor and Category, defined below:
Code:
Ext.define('Vendor', {
extend: 'Ext.data.Model',
fields: [
{ name: 'VendorId', type: "int" },
{ name: 'Name', type: "string" },
{ name: 'CategoryId', type: "int" },
],
hasOne: 'Category'
});
Ext.define('Category', {
extend: 'Ext.data.Model',
fields: [
{ name: 'CategoryId', type: "int" },
{ name: 'Name', type: "string" },
]
});
I have a store in a View Model called VendorStore that uses the Vendor model. I'm binding the Store to a grid. My question is, is there a way to bind the Category Name to a grid column? Something like this:
Code:
dataIndex: 'Category.Name'
I tried this, but am getting a blank in that column. I checked the store when it loads and the Category Name data is there as expected. Any help would be appreciated.