我想根据特定条件隐藏单元格值,例如单元格值 < 20
问问题
3200 次
2 回答
1
您只需要一个格式化程序
jQuery("#grid_id").jqGrid({
...
colModel: [
...
{name:'price', index:'price', width:60, align:"center", editable: true, formatter:currencyFmatter},
...
]
...
});
function currencyFmatter (cellvalue, options, rowObject)
{
if (cellvalue < 20)
return "";
else
return new_format_value
}
参考:http ://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_formatter
于 2013-09-07T19:12:35.253 回答
0
怎么样..
$('table td').each(function(){
$this = $(this);
if(parseFloat($this.text()) < 20) {
$this.css('visibility', 'hidden');
}
});
于 2013-08-28T14:13:11.517 回答