2012-12-13 68 views
0

海蘭,我新來使用ExtJS的..
我有這樣的GridPanel中:如何根據記錄值(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)列COLVALUEcolinfo的值爲「無法編輯此值!!」。
我如何配置這是條件?

回答

0

您可以使用您要禁用其列的呈現器功能。根據函數中的記錄值,您可以將文本字段設置爲禁用。

相關問題