Extjs 3 控制Grid某行某列不可編輯

來源:互聯網
上載者:User

標籤:body   false   fun   view   strip   getheight   efi   不能   cli   

var cmGoodsFee = new Ext.grid.ColumnModel([rmGoodsFee, {        header : "id",        tooltip : "id",        dataIndex : ‘id‘,        id : ‘id‘,        width : 80,        align : ‘center‘,        hidden : true    }, {        header : "計費類型",        tooltip : "計費類型",        dataIndex : ‘chargAccName‘,        id : ‘chargAccCode‘,        width : 120,        sortable : true,//      summaryType : ‘count‘,        hideable : false        // summaryRenderer : function(v, params,        // data) {    // return ((v == 0 || v > 1) ? ‘( 合計)‘ :    // ‘(合計)‘);    // }}   , {        header : "付款方向",        tooltip : "付款方向",        dataIndex : ‘chargingDirection‘,        id : ‘chargingDirection‘,        width : 120,        sortable : true    }, {        header : "金額",        tooltip : "金額",        dataIndex : ‘feeAmount‘,        id : ‘feeAmount‘,        width : 150,        align : ‘center‘,        sortable : true,        // summaryType : ‘sum‘,        editor : new Ext.form.NumberField({                    style : ‘text-align:left‘,                    decimalPrecision : 4,                    allowNegative : false, // 不能為負數                    maxValue : 999999999,                    maxText : ‘最大不超過999,999,999!‘                })    }]);//  var summary = new Ext.ux.grid.GridSummary();    wayBillsDetailGridFee = new Ext.grid.EditorGridPanel({    collapsible : false,    clicksToEdit : 1,    animCollapse : false,    stripeRows : true,    store : wayBillDetailStoreFee,    cm : cmGoodsFee,    height : Ext.getBody().getHeight() - 175,    frame : true,    loadMask : true,// 載入遮罩動畫    columnLines : true,    autoShow : false,    viewConfig : {        forceFit : false    },    clicksToEdit : 1,    listeners : {        cellclick : function(grid, rowIndex, columnIndex, e) {            var record = grid.getStore().getAt(rowIndex);            if (record.get(‘chargAccName‘) == ‘長途運費‘ && columnIndex == 4) {                return false;            } else {                return true;            }        }    }        // plugins : summary    });

 

Extjs 3 控制Grid某行某列不可編輯

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.