0
votes

I have two model and A has one B and one store.

Ext.create('Ext.grid.Panel', {
    title: 'Column Demo',
    store: myStore,
    columns: [
        {text: 'b_id', dataIndex:'record_of_A.b().id' },  // such as this
    ],
    width: 400,
    forceFit: true,
    renderTo: Ext.getBody()
});

Please help me.

1

1 Answers

0
votes

You can achieve this with a renderer:

for example:

Ext.create('Ext.grid.Panel', {
    title: 'Column Demo',
    store: myStore,
    columns: [{
        text: 'b_id',
        renderer: function (value, meta, record) {
            return record.getb().get('id');
        }
    }],
    width: 400,
    forceFit: true,
    renderTo: Ext.getBody()
});

Here's a fiddle: http://jsfiddle.net/johanhaest/HRFZK/