如果表格单元格中存在换行符,为什么 jqGrid 的 tableToGrid 会创建双倍高度的行?



我一直在尝试在Windows平台上使用tableToGrid函数将表转换为jqGrid。由于某种原因,如果有一个新的行符号,它会增加两倍的行高。有人知道如果它是一个功能或错误,我怎么能改变行为,忽略新的行字符有正常的行高?

<head>
    <script type="text/javascript">
         $(document).ready(function () {
             tableToGrid('#mytable', {
                caption: "My converted table!",
                pager: '#mypager',
                multiselect: true,
                height: 'auto',
                gridview: true
            });
        });
     </script>
</head>
<body>
     <table id="mytable" cellspacing=0 cellpadding=1 border=1>
        <thead>
        <tr>
                <th>Icon</th>
                <th>Platform</th>
                <th>Size</th>      
        </tr>
        </thead>
        <tbody>
        <tr>
                <td><img src="http://icons.iconarchive.com/icons/visualpharm/must-have/16/Properties-icon.png" alt=""></td>
                <td>PC</td>
                <td>12</td>
        </tr>
        <tr>
                <td>
          <img src="http://icons.iconarchive.com/icons/visualpharm/must-have/16/Properties-icon.png" alt="">
        </td>
                <td>Mac</td>
                <td>15</td>
        </tr>
        </tbody>
    </table>
     <div id="mypager"></div> 
 </body>
</html>

我遇到了类似的事情。您是否尝试过像这样将表格合并成一行:

<tr><td><img src="http://icons.iconarchive.com/icons/visualpharm/must-have/16/Properties--con.png" alt=""></td><td>PC</td><td>12</td></tr> 

最新更新