Extjs checkcolumn根据值禁用某些行 [英] Extjs checkcolumn disable for some rows, based on value
本文介绍了Extjs checkcolumn根据值禁用某些行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个网格,有checkcolumn。
I have a grid, with checkcolumn. It's dataIndex is, for example, 'checked'.
我想禁用或隐藏某些行的复选框,其中另一个值'can_be_checked'例如是false /空。
I want to disable or hide checkboxes for some rows, where another value, 'can_be_checked' for example, is false/empty.
Renderer已经在checkcolumn中定义,打乱生成复选框。
Renderer is already defined in checkcolumn, messing with it breaks generation of checkbox.
推荐答案
您可以在渲染器中隐藏复选框,例如:
You may hide the checkbox just inside the renderer, for example:
column.renderer = function(val, m, rec) {
if (rec.get('can_be_checked') == 'FALSE'))
return '';
else
return (new Ext.ux.CheckColumn()).renderer(val);
};
这篇关于Extjs checkcolumn根据值禁用某些行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文