EasyUI Forum
May 01, 2024, 08:00:00 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Issues of datagrid plugin  (Read 29936 times)
Xiaolin
Newbie
*
Posts: 14


View Profile Email
« 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


View Profile Email
« 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


View Profile Email
« 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


View Profile Email
« 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


View Profile Email
« 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  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!