easyUI关于datagrid那点事,该怎么解决
easyUI关于datagrid那点事
现有字段id,name,class,age,sex.
在easyUI页面加载之后,其中age=18的人name列中的内容全部变红展示.来个大神,第一次发帖!
------解决思路----------------------
$('#dg').datagrid({
columns:[[
{field:'listprice',title:'List Price', width:80, align:'right',
styler: function(value,row,index){
if (value < 20){
return 'background-color:#ffee00;color:red;';
// the function can return predefined css class and inline style
// return {class:'c1',style:'color:red'}
}
}
}
]]
});
不是有列样式改变的方法
现有字段id,name,class,age,sex.
在easyUI页面加载之后,其中age=18的人name列中的内容全部变红展示.来个大神,第一次发帖!
------解决思路----------------------
$('#dg').datagrid({
columns:[[
{field:'listprice',title:'List Price', width:80, align:'right',
styler: function(value,row,index){
if (value < 20){
return 'background-color:#ffee00;color:red;';
// the function can return predefined css class and inline style
// return {class:'c1',style:'color:red'}
}
}
}
]]
});
不是有列样式改变的方法