标签:lse nbsp enter 控制 Matter cti 动态 spec datagrid
方法一:{field:‘pictureId‘,title:‘是否有海报‘,width:70,align:"center",
// v 当前字段值, r行对象, i为索引
formatter:function(v,r,i){
if(r.pictureId == null || r.pictureId == ‘‘){
$(‘#gridspecialprogram‘).datagrid(‘hideColumn‘, ‘pictureId‘);//pictureId:filed值
}else{
$(‘#gridspecialprogram‘).datagrid(‘showColumn‘, ‘pictureId‘);//gridspecialprogram:datagrid的id
return r.pictureId;
}
}
}
方法二:{field:‘pictureId‘,title:‘是否有海报‘,width:70,align:"center",
// v 当前字段值, r行对象, i为索引
formatter:function(v,r,i){
if(r.pictureId == null || r.pictureId == ‘‘){
$(‘td[field="pictureId"]‘).hide();//pictureId:filed值
}else{
$(‘td[field="pictureId"]‘).show();//gridspecialprogram:datagrid的id
return r.pictureId;
}
}
}
---------------------
作者:成市风彩
来源:CSDN
原文:https://blog.csdn.net/world_the_begin/article/details/80326805
【转】easyUI datagrid 动态控制列的隐藏和显示
标签:lse nbsp enter 控制 Matter cti 动态 spec datagrid
原文地址:https://www.cnblogs.com/tyrd/p/10972781.html