Easy UI使用记录

来源:互联网 发布:优斗士网络推广效果 编辑:程序博客网 时间:2024/04/30 23:13
  • Easy UI DataGrid鼠标悬停显示表格内容:
 //鼠标悬停显示内容            function formatCellTooltip(value) {                return "<span title='" + value + "'>" + value + "</span>";            }
  • 自定义DataGrid样式:
 <style>        .datagrid-row {            height: 42px;            text-align:center;        }    </style>
  • 设置DataGrid表格高度不随内容变化:
 autoRowHeight:false
  • DataGrid条件设置行变色:
 //设置失效样式                rowStyler: function (index, row) {                    if (row.NOTICE_FLAG == 0) {                        return 'background-color:#CDCDC1';                    }                }
  • LayOut布局下使某north布局不显示,且不影响本来样式:
<div region="north" border="false" collapsed="false"         style="height: 5px; overflow:hidden" align="left">        <form id="searchForm">            <div class="tableForm datagrid-toolbar" style="height:2px;width:auto;">                <table class="tableForm datagrid-toolbar" style="height: 1px;width:auto;">                    <tr >                        <td hidden="hidden"><a class="easyui-linkbutton"></a></td>                    </tr>                </table>            </div>        </form>    </div>
  • 使用富文本编辑器时忽略其生成样式:
{                    field:'TOPIC_CONTENT',                    title:'热帖内容',                    width: 290,                    height:42,                    sortable : true,                     formatter: function (value) {                        return "<lable title='" + value + "' align='top'  height=42>" + value.replace(/<.*?>/ig,"") + "</lable>";                    }