4
嗨技術高手沒有產生, 我與「Rowwidget」插件的幫助下創建了嵌套網格中的Ext JS 6.2。但是我已經獲得了外部網格。但是,它沒有顯示內部網格。網格嵌套在Ext JS的6.2
我跟着這個Sencha code example
我的代碼在繳費: Sencha Fiddle
在此先感謝...
嗨技術高手沒有產生, 我與「Rowwidget」插件的幫助下創建了嵌套網格中的Ext JS 6.2。但是我已經獲得了外部網格。但是,它沒有顯示內部網格。網格嵌套在Ext JS的6.2
我跟着這個Sencha code example
我的代碼在繳費: Sencha Fiddle
在此先感謝...
在這種情況下,性能的參考文件應該如下:
變化的orderModel:
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
}});
變化小部件:
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
}]
}
你跟着它,但你忽略了變量名稱和型號名稱都是經過仔細選擇的。您的公司記錄沒有名爲ordersListJSONArray的模型字段,因爲沒有將公司作爲關聯的ordersListJSONArrayModel。所以'{record.ordersListJSONArray}'指向無處不在。 – Alexander
感謝您的建議@Alexander。但是,如果您在Sencha小提琴中分享更正的代碼,那可能會很好。 Regards, – guruprabhus
Thanks @Alexander。剛纔我明白你的觀點。此外,我們必須遵循命名標準,同時在** Ext商店**中映射另一個模型。如果沒有** RESTFUL ** api服務電話,我們也無法做到這一點。 – guruprabhus