EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 21, 2024, 10:01:38 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
Bug Report
>
Issues of datagrid plugin
Pages: [
1
]
« previous
next »
Print
Author
Topic: Issues of datagrid plugin (Read 30033 times)
Xiaolin
Newbie
Posts: 14
Issues of datagrid plugin
«
on:
July 06, 2011, 08:46:52 AM »
I setted the datagrid width to a specific number, and setted the datagrid height to 'auto'.
After calling mergeCells method (I called it in onLoadSuccess event handler), the vertical scrollbar displayed! And the cells of the body did not align to the cells of the header again!
BTW, it is perfect if we can set the alignment of the header text and the alignment of the body cells text separately.
Please see attached screenshot for details.
«
Last Edit: July 06, 2011, 08:49:46 AM by Xiaolin
»
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Issues of datagrid plugin
«
Reply #1 on:
July 06, 2011, 08:15:00 PM »
Can you give more details about this issue?
The easyui version you are using
The browser and its version
Some test code about your issue
Logged
Xiaolin
Newbie
Posts: 14
Re: Issues of datagrid plugin
«
Reply #2 on:
July 07, 2011, 06:08:23 AM »
easyui: 1.2.3
browser: IE8
test code see attached screenshot.
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Issues of datagrid plugin
«
Reply #3 on:
July 07, 2011, 06:23:40 PM »
Cannot find your test code but you can call 'fixColumns' or 'resize' method to try to fix this issue. If the problem is not solved, run your code in another browser.
Logged
Xiaolin
Newbie
Posts: 14
Re: Issues of datagrid plugin
«
Reply #4 on:
July 08, 2011, 08:43:33 AM »
The problem was not solved by calling fitColumns/fixColumnSize/resize, but it is ok when run in Firefox 5.0. The following is the code:
<table id="dgCapacity" singleSelect="true" url="@Url.Action("CapacityList")" style="width:424px;height:auto;">
<thead>
<tr>
<th field="YearMonth" width="80" align="center">年月</th>
<th field="TypeNO" width="80">型号</th>
<th field="Quantity" width="80" align="right">订单总数</th>
<th field="LineDays" width="80" align="right">工作线日</th>
<th field="Percentage" width="80" align="right">百分比</th>
</tr>
</thead>
</table>
<script type="text/javascript">
$(function () {
$("#dgCapacity").datagrid({
queryParams: { StartYearMonth: '201107', EndYearMonth: '201107' },
onLoadSuccess: function (data) {
var rowIndex = 0, rowSpan = 1;
var rows = $(this).datagrid("getRows");
for (var i = 0; i < rows.length; i++) {
if (rows
.TypeNO.substr(0, 4) == "ZZZZ") {
$(this).datagrid("mergeCells", { index: rowIndex, field: "YearMonth", rowspan: rowSpan });
rowIndex = i + 1;
rowSpan = 1;
}
else {
rowSpan++;
}
}
}
});
});
</script>
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...