JQGrid: Dynamically set a cell to uneditable based on content

前端 未结 3 1840
情深已故
情深已故 2020-12-03 15:32

I\'m having some issues getting some cells (with cellEdit: true) to be non-editable even though the column is set to editable.

I\'ve tried many ways, like beforeEdi

3条回答
  •  渐次进展
    2020-12-03 16:12

    var cellattr = function(rowId, tv, rawObject, cm, rdata) {
    if(rawObject.locked) return ' class="not-editable-cell"';
    

    };

    In colModel: each column options add

    {name: 'name',index: 'name', editable: true, width: 100, sortable: false, align: 'center', cellattr: cellattr}
    

提交回复
热议问题