easyui treegrid根据条件定义行样式
2015-03-18 15:10
309 查看
$('#tt').treegrid({ // url:'get_data.php', data: data, title:"Folder Browser" , idField:'id', treeField:'name', rowStyler: function(row) {if (row.size=='') { return 'background-color:#6293BB;color:#fff;font-weight:bold;'; } }, columns:[[ {title:'name',field:'name',width:220}, {field:'size',title:'Persons',width:100,align:'right'}, {field:'date',title:'Begin Date',width:120} ]], onLoadSuccess: function(row){$(this).treegrid('enableDnd', row?row.id:null);}, onDblClickCell:function(){$('#tt').treegrid('getEditor',{index:row.id,field:'name'}).target.val(formula_text);} });
如果为datagrid只将修改
rowStyler: function(row)为rowStyler: function(index,row)即可
相关文章推荐
- EasyuI TreeGrid设置行可选、checkbox可勾选,以及根据checkbox勾选,默认选中行
- 根据自己定义颜色(或样式)显示符合条件的feature
- Kendo Grid 行样式(根据条件改变行颜色)
- Extjs gridpanel 中的checkbox(复选框)根据某行的条件不能选中的解决方法
- Easyui Treegrid改变默认图标的方法
- EasyUI TreeGrid删除选中行
- EasyUI TreeGrid编辑单元格的点击事件和赋值
- jQuery Easyui datagrid/treegrid 清空数据
- easyui tree:根据属性格式化树节点名称
- java递归解析easyui treegrid json数据
- easyui treegrid checkbox 联动
- easyUI treeGrid异步加载,前端+后台实现,包括增删改等具体功能
- EasyUI_tree根据数据库数据非迭代生成树形结构
- [原创] MVC3 Webgrid Ajax查询条件绑定(Search Conditions Binding)、自动编号(Serial Number)及分页(Paging)的样式定义
- ireport根据相关条件控制样式设置
- Asp.net MVC 中使用easyui treegrid
- EasyUI TreeGrid删除选中行
- EasyUI TreeGrid编辑单元格的点击事件和赋值
- devexpress实现单元格根据条件显示不同的样式(颜色、字体、对齐方式,大小等)
- EasyUi TreeGrid封装