easyui相关笔记
来源:互联网 发布:工程造价软件破解版 编辑:程序博客网 时间:2024/06/08 13:57
easyui datagrid表格点击不选中行不变色:
1.方法一
$('#dg').datagrid({
onClickRow: function (rowIndex, rowData) {
$(this).datagrid('unselectRow', rowIndex);
}
})
2.方法二
$('#dg').datagrid({
onBeforeSelect:function(){
return false;
},
})
3.更改选中状态的颜色或者鼠标滑过的颜色
<style type="text/css">
.datagrid-row-selected {
background: #fff;
color: #000000;
}
.datagrid-row-over,.datagrid-header td.datagrid-header-over {
background: #fff;
color: #000000;
cursor: default;
}
</style>
easyui datagrid单元格内容根据返回内容修改显示
{field:'companyname',title:'订单公司',width:'14%',formatter:function(value,row,index){
return ((row.companyname==null)?('<font color=\'red\'>未认证</font>'):(row.companyname));
}},
{field:'dctime',title:'下单时间',width:'6%',},
{field:'type',title:'来源',width:'4%', formatter:function(value,row,index){
if(row.type == '2'){
return ('前台');
}else if (row.type == '3'){
return ('后台');
};
}},
easyui datagrid表格 当后台没有数据返回 显示没有相关记录
onLoadSuccess:function(data){
if(parseInt(data.total)<=0){
$(this).datagrid('appendRow', { orderNum: '<div style="text-align:center;color:red">没有相关记录!</div>' }).datagrid('mergeCells', { index: 0, field: 'orderNum', colspan: 15 });
$(this).closest('div.datagrid-wrap').find('a').removeAttr('href');
$(this).closest('div.datagrid-wrap').find('div.datagrid-pager').hide();
}
else $(this).closest('div.datagrid-wrap').find('div.datagrid-pager').show();
},
1.方法一
$('#dg').datagrid({
onClickRow: function (rowIndex, rowData) {
$(this).datagrid('unselectRow', rowIndex);
}
})
2.方法二
$('#dg').datagrid({
onBeforeSelect:function(){
return false;
},
})
3.更改选中状态的颜色或者鼠标滑过的颜色
<style type="text/css">
.datagrid-row-selected {
background: #fff;
color: #000000;
}
.datagrid-row-over,.datagrid-header td.datagrid-header-over {
background: #fff;
color: #000000;
cursor: default;
}
</style>
easyui datagrid单元格内容根据返回内容修改显示
{field:'companyname',title:'订单公司',width:'14%',formatter:function(value,row,index){
return ((row.companyname==null)?('<font color=\'red\'>未认证</font>'):(row.companyname));
}},
{field:'dctime',title:'下单时间',width:'6%',},
{field:'type',title:'来源',width:'4%', formatter:function(value,row,index){
if(row.type == '2'){
return ('前台');
}else if (row.type == '3'){
return ('后台');
};
}},
easyui datagrid表格 当后台没有数据返回 显示没有相关记录
onLoadSuccess:function(data){
if(parseInt(data.total)<=0){
$(this).datagrid('appendRow', { orderNum: '<div style="text-align:center;color:red">没有相关记录!</div>' }).datagrid('mergeCells', { index: 0, field: 'orderNum', colspan: 15 });
$(this).closest('div.datagrid-wrap').find('a').removeAttr('href');
$(this).closest('div.datagrid-wrap').find('div.datagrid-pager').hide();
}
else $(this).closest('div.datagrid-wrap').find('div.datagrid-pager').show();
},
阅读全文
0 0
- easyui相关笔记
- easyui学习笔记-datagrid中相关学习
- easyui笔记
- easyui笔记
- easyui笔记
- easyui 笔记
- easyUI 笔记
- easyui笔记
- easyui笔记
- Easyui笔记
- easyui的相关经验
- Jquery easyui 相关FAQ
- jQuery EasyUI相关问题
- EasyUI tree 相关
- easyui-tabs使用相关
- easyUI相关资料整理
- easyui相关解释
- easyui-tree相关
- 构建支持SSH服务的镜像
- 《Spring实战》读书笔记——第一章 Spring之旅
- Go 学习笔记:延迟执行函数 defer
- jquery ajax异步 获得返回值
- markdown backup
- easyui相关笔记
- Java面试题全集(上)
- python yield
- RocketMQ原理解析-consumer 6.pull消息消费
- Dorado控件调用
- PCL安装的一些问题总结
- cudnn Installation in Linux
- 07_c++运算符重载
- python的文件类型、变量、数值和字符串