[英]Kendo grid column header
我正在使用Kendo UI Grid,我想知道是否可以同時具有列標題和行標題:
colHeader1 colHeader2 colHeader3
rowHeader1
rowHeader2
rowHeader3
我的網格:
$("#dataGrid").kendoGrid({
editable: true,
columns: [
{ field: "name", title: "Name" },
{ field: "age", title: "Age" }
],
dataSource: _dataSource()
});
var _dataSource = function () {
return new kendo.data.DataSource({
transport: {
read: {
type: "GET",
crossDomain: true,
url: url + "person",
dataType: "json"
}
},
schema: {
data: "data",
total: "total"
}
});
};
我的網格數據源將始終有30條記錄(固定)。
嘗試使用rowTemplate
:
rowTemplate: kendo.template($("#template").html())
模板是:
<script id="template" type="text/x-kendo-template">
<tr data-uid="#= uid #">
<td class='k-header'>#: fixed #</td>
<td>#: name #</td>
<td>#: age #</td>
</tr>
</script>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.