2级的kendo网格列标题

时间:2014-04-09 09:29:39

标签: kendo-ui kendo-grid

我使用kendo ui grid 我想制作一个具有2级标题列的网格,如下图所示: enter image description here

我有3个标题,12个子标题,对于数据,它有12列 我可以通过剑道网格做到这一点吗?

1 个答案:

答案 0 :(得分:0)

您可以耐心等待并使用Kendo header template

<script type="text/x-kendo-template" id="template">
                <div class="toolbar k-grid-header k-grid-header-wrap">
                   <table role="grid">
                     <colgroup>
                        <col style="width:200px">
                        <col>
                        <col style="width:100px">
                        <col>
                     </colgroup>
                     <thead role="rowgroup">
                     <tr role="row">
                        <th role="columnheader" class="k-header">Column level 2</th>
                        <th role="columnheader" class="k-header">Column level 2</th>
                      </tr>
                      </thead>
                   <table>
                </div>
            </script>

 var grid = $("#grid").kendoGrid({
     toolbar: kendo.template($("#template").html()) 
  });

此解决方案显然不支持动态列宽和类似功能,您将在1级列中使用。