gur*_*hus 5 grid plugins nested extjs extjs6-classic
Hi Techies,我已经在"Rowwidget"插件的帮助下在Ext JS 6.2中创建了嵌套Grid.但是我得到了外网格.但是,它没有显示内部网格.
我按照这个Sencha代码示例
我的代码可以在: Sencha Fiddle
提前致谢...
小智 2
在这种情况下,引用的属性应如下所示:
订单型号的变化:
var orderMDL = Ext.define('orderModel', {
extend: 'Ext.data.Model',
fields: [
// Declare an association with Company.
// Each Company record will be decorated with
// an "orders" method which yields a store
// containing associated orders.
{
name: 'companyId',
reference: {
type:'companyModel',
inverse:'orders'
}
}, {
name: 'productCode'
}, {
name: 'quantity',
type: 'number'
}, {
name: 'date',
type: 'date',
dateFormat: 'Y-m-d'
}, {
name: 'shipped',
type: 'boolean'
}],
proxy: {
type: 'memory',
data: ordersListJSONArray
}});
Run Code Online (Sandbox Code Playgroud)
小部件中的更改:
widget: {
xtype: 'grid',
autoLoad: true,
bind: {
store: '{record.orders}',
title: 'Orders for {record.name}'
},
columns: [{
text: 'Order Id',
dataIndex: 'id',
width: 75
}, {
text: 'Procuct code',
dataIndex: 'productCode',
width: 265
}, {
text: 'Quantity',
dataIndex: 'quantity',
width: 100,
align: 'right'
}, {
format: 'Y-m-d',
width: 120,
text: 'Date',
dataIndex: 'date'
}, {
text: 'Shipped',
dataIndex: 'shipped',
width: 75
}]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1191 次 |
| 最近记录: |