[英]How to set disabled field column on grid depending on record value (EXTJS)?
嗨,我剛開始使用Extjs。
我有一個這樣的網格面板:
var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
var myGrid = Ext.create('Ext.grid.Panel', {
store: myStore,
plugins: [cellEditing],
columns: [
{dataIndex: 'colid', hidden: true},
{text: "Name", dataIndex: 'colname', sortable: true},
{text: "Info", dataIndex: 'colinfo', sortable: true},
{text: "Value", dataIndex: 'colvalue',
editor: {
xtype: 'textfield'
}
}
]
});
現在,我想設置編輯器為空(如柱COLINFO,colname的和colid)時COLINFO值列COLVALUE“不能修改這個值!” ..
我該如何配置這種情況?
您可以使用要為其禁用的列的渲染器功能。 根據功能中的記錄值,可以將文本字段設置為禁用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.