jQuery MiniUI
标题:
datagrid 兼容下滚动条
[打印本页]
作者:
jrx
时间:
2017-9-21 17:19:32
标题:
datagrid 兼容下滚动条
<html>
<head>
<title>任务</title>
</head>
<body>
<h2 class="path">
任务
</h2>
<form>
<input type="hidden" name="formTaskInfo.id" value="${formTaskInfo.id}" id="id" />
<input type="hidden" name="formTaskInfo.state" value="${formTaskInfo.state}" id="state" />
<input type="hidden" name="formTaskInfo.createStaffId" value="${formTaskInfo.createStaffId}" id="createStaffId" />
<input type="hidden" name="formTaskInfo.createTime" value="<fmt:formatDate value='${formTaskInfo.createTime}' pattern='yyyy-MM-dd HH:mm:ss' />" id="createTime" />
<input type="hidden" name="formTaskInfo.editingStaffId" value="${formTaskInfo.editingStaffId}" id="editingStaffId" />
<table border="0" class="xbox" cellspacing="1" cellpadding="0">
<tr>
<td class="label">
发布单号
</td>
<td class="content">
<span id="taskCode">${formTaskInfo.taskCode }</span>
</td>
</tr>
<tr>
<td class="label">
申报人姓名
</td>
<td class="content">
<span id="reqName">${formTaskInfo.reqName }</span>
</td>
</tr>
<tr>
<td class="label">
处理意见
</td>
<td class="content" colspan="3">
<textarea class="edit w500" name="dealLog" id="dealLog" rows="3"></textarea>
</td>
</tr>
<tr>
<td class="label">
编辑表单
</td>
<td class="content" colspan="3">为当前表单继续添加
<input id="rowNum" class="mini-spinner" style="width:100px;"/>行
<input id="colNum" class="mini-spinner" style="width:100px;"/>列
<a class="mini-button">确定</a>
<div id="datagrid1" class="mini-datagrid" style="width:600px;height:280px;"
allowCellEdit="true" allowCellSelect="true" showPager="false" cellEditAction="celldblclick"
>
<div property="columns">
<div type="indexcolumn"></div>
</div>
</div>
</td>
</tr>
</table>
</form>
<div class="op">
<input type="button" id="btnTemp" class="btn" value="暂存" />
<input type="button" id="btnTemp" class="btn" value="发布" />
<input type="button" id="btnTemp" class="btn" value="取消" />
</div>
</body>
</html>
function addColumn(colNum) {
var columns = grid.getColumns();console.log(columns);
for(var i=0;i<colNum;i++){
colCnt ++;
colNames = colNames + "column"+colCnt + ",";
thNames = thNames + "列"+colCnt + ",";
/* columns.push(columns[columns.length-1]);
columns[columns.length-1].field = "column"+colCnt;
columns[columns.length-1].header="列"+colCnt;
columns[columns.length-1].editor={};
columns[columns.length-1].width=120;
columns[columns.length-1].editor.type="textbox"; */
columns.push({ field: "column"+colCnt, width: 120, headerAlign: "center", header: "列"+colCnt, editor: { type: "textbox", minValue: 0, maxValue: 200, value: 25} });
}
grid.set({
columns: columns
});
}
function addRow(rowNum) {
for(var i=0;i<rowNum;i++){
rowCnt ++;
var row = {};
grid.addRow(row);
}
grid.cancelEdit();
grid.beginEditRow(row);
}
以上。
列变多后不会出现滚动条;
加上
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
">
之后可以出现,但是
<h2 class="path">
任务
</h2>
这一块也出现滚动条了。
然后加不加好像在极速非兼容模式下都正常;
在兼容模式下不行;
示例上有运行代码,但是好像只能在兼容下测不了?
额 刚用ie兼容模式都打不开
http://www.miniui.com/demo/index.html
能否帮忙看下如何调整或者修改,grid放到form也无妨
作者:
jrx
时间:
2017-9-21 17:21:24
示例上有运行代码,但是好像在兼容下测不了?
grid放到form之外也无妨
总之是和你们示例一个样式的,标题,表单,grid,描述,这样列在页面上就行
作者:
dforce
时间:
2017-9-21 18:45:07
jrx 发表于 2017-9-21 17:21
示例上有运行代码,但是好像在兼容下测不了?
grid放到form之外也无妨
总之是和你们示例一个样式的,标题, ...
MiniUI只支持标准模式,请不要使用兼容模式
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2