Kendo UI是帶有jQuery、Angular、React和Vue庫的JavaScript UI組件的最終集合,無論選擇哪種JavaScript框架,都可以快速構(gòu)建高性能響應(yīng)式Web應(yīng)用程序。通過可自定義的UI組件,Kendo UI可以創(chuàng)建數(shù)據(jù)豐富的桌面、平板和移動Web應(yīng)用程序。通過響應(yīng)式的布局、強(qiáng)大的數(shù)據(jù)綁定、跨瀏覽器兼容性和即時使用的主題,Kendo UI將開發(fā)時間加快了50%。
可以修改和控制Kendo UI PivotGrid小部件的字段名稱所呈現(xiàn)的內(nèi)容。


下面的示例演示如何更改PivotGrid中[Date].[Calendar]和[Product].[Category] 字段顯示的文本。
$(document).ready(function () {
var pivotgrid =$("#pivotgrid").kendoPivotGrid({
filterable: true,
columnWidth: 200,
height: 580,
dataBound: function() {
var fields =this.columnFields.add(this.rowFields).add(this.measureFields);
?
fields.find(".k-button")
.each(function(_, item) {
item = $(item);
var text =item.data("name").split(".").slice(-1) + "";
?
item.contents().eq(0).replaceWith(text);
});
},
dataSource: {
type: "xmla",
columns: [{ name:"[Date].[Calendar]", expand: true }, { name:"[Product].[Category]" } ],
rows: [{ name:"[Geography].[City]" }],
measures: ["[Measures].[Internet SalesAmount]"],
transport: {
connection: {
catalog: "Adventure Works DW2008R2",
cube: "Adventure Works"
},
read: "https://demos.telerik.com/olap/msmdpump.dll"
},
schema: {
type: "xmla"
},
error: function (e) {
alert("error: " +kendo.stringify(e.errors[0]));
}
}
}).data("kendoPivotGrid");
});
#pivotgrid
{
display: inline-block;
vertical-align: top;
width: 70%;
}
京ICP備09015132號-996 | 違法和不良信息舉報電話:4006561155
© Copyright 2000-2026 北京哲想軟件有限公司版權(quán)所有 | 地址:北京市海淀區(qū)西三環(huán)北路50號豪柏大廈C2座11層1105室
北京哲想軟件集團(tuán)旗下網(wǎng)站:哲想軟件 | 哲想動畫