EasyUI 설정 DataGrid 내 텍스트 상자 줄 바꿈, 편집 가능

1853 단어 datagrid
function getServiceState() {
	$('#datagrid').datagrid({
		url: $.navinfo.contextPath + '/MonitorSysAction.do?method=getHttpState',
		striped: true,
		collapsible: true,
		remoteSort: false,
		fit: true,
		fitColumns: true,
		singleSelect: true,
		pageNumber: 1,
		nowrap:false,
		pageSize: 10,
		pagination: false,
		columns : [ [  {
			field : 'serviceName',
			title : ' ',
			width : 10,
			align:'left',
			formatter : function(value, row, index) {
				return row.serviceName;
			}
		}, {
			field : 'serviceState',
			title : ' ',
			width : 10,
			align:'left',
			editor: {
                type: 'validatebox',
                	options: { required: true } 
            },
			formatter : function(value, row, index) {
				if(row.serviceState == 200){
					return row.serviceState;
				}else{
					return  "<div style=\"width: 560px;margin:0 auto;border:red 0px solid;display:block;word-break: break-all;word-wrap: break-word;color:red \">"+row.serviceState+"</div>";
				}
				
			}
		}
		] ],
		rownumbers: true,
		onLoadSuccess: function(data){
			
		}/*,onDblClickRow: function (rowIndex,rowData) {
            //alert(" ");
			$("#datagrid").datagrid("beginEdit", rowIndex);
	        //$("#datagrid").datagrid('endEdit',rowIndex);
	        //$("#datagrid").datagrid('beginEdit',rowIndex);
	        //$('#datagrid').datagrid('selectRow',rowIndex);
        }*/
	});
}

좋은 웹페이지 즐겨찾기