开发者

Why jqGrid's tableToGrid creates double height rows if new line characters present in a table cell?

I've been trying to convert table to jqGrid with tableToGrid function on Windows platform. For some reason it increases row height twice if there is a new line symbol. Does anybody know if it is a feature or bug and how can I change behaviour to ignore new line characters to have normal row height?

<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="">
        </开发者_Go百科td>
                <td>Mac</td>
                <td>15</td>
        </tr>
        </tbody>
    </table>
     <div id="mypager"></div> 
 </body>
</html>


I ran into something similar. Have you tried to combine the tablerow into a single line like this:

<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> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜