发布时间:2021-05-24
Kendo UI for jQuery R2 2021试用版下载
Kendo UI是带有jQuery、Angular、React和Vue库的JavaScript UI组件的最终集合,无论选择哪种JavaScript框架,都可以快速构建高性能响应式Web应用程序。通过可自定义的UI组件,Kendo UI可以创建数据丰富的桌面、平板和移动Web应用程序。通过响应式的布局、强大的数据绑定、跨浏览器兼容性和即时使用的主题,Kendo UI将开发时间加快了50%。
下面的示例演示如何访问PivotConfigurator TreeView小部件以及重命名Measurement和KPI消息。
<div id=”example”>
<div id=”configurator”></div>
<script>
$(document).ready(function () {
var ds = new kendo.data.PivotDataSource({
type: “xmla”,
columns: [{ name: “[Date].[Calendar]”, expand: true }, { name: “[Product].[Category]” } ],
rows: [{ name: “[Geography].[City]” }],
measures: [“[Measures].[Reseller Freight Cost]”],
transport: {
connection: {
catalog: “Adventure Works DW 2008R2”,
cube: “Adventure Works”
},
read: “https://demos.telerik.com/olap/msmdpump.dll”
},
schema: {
type: “xmla”
},
error: function (e) {
alert(“error: ” + kendo.stringify(e.errors[0]));
}
});
var configurator = $(“#configurator”).kendoPivotConfigurator({
dataSource: ds,
filterable: true,
sortable: true,
height: 580
}).getKendoPivotConfigurator();
var source = configurator.treeView.dataSource;
source.one(“change”, function() {
source.get(“[Measures]”).set(“caption”, “Translaged Measures”);
source.get(“[KPIs]”).set(“caption”, “Translaged KPIs”);
});
});
</script>
</div>
以下示例演示如何转换Kendo UI PivotGrid小部件的消息。
<div id=”example”>
<div id=”pivotgrid”></div>
<script>
//messages
kendo.ui.PivotSettingTarget.fn.options.messages = {
empty: “Translated ‘Drop fields here'”
};
kendo.ui.PivotFieldMenu.fn.options.messages = {
info: “Translated ‘info'”,
sortAscending: “Translated ‘sortAsc'”,
sortDescending: “Translated ‘sortDesc'”,
filterFields: “Translated ‘filterFields'”,
filter: “Translated ‘filter'”,
include: “Translated ‘include'”,
title: “Translated ‘title'”,
clear: “Translated ‘clear'”,
ok: “Translated ‘ok'”,
cancel: “Translated ‘cancel'”,
operators: {
contains: “Translated ‘contains'”,
doesnotcontain: “Translated ‘doesnotcontain'”,
startswith: “Translated ‘startswith'”,
endswith: “Translated endswith'”,
eq: “Translated ‘eq'”,
neq: “Translated ‘neq'”
}
};
kendo.ui.PivotConfigurator.fn.options.messages = {
measures: “Translated ‘measures'”,
columns: “Translated ‘columns'”,
rows: “Translated ‘rows'”,
measuresLabel: “Translated ‘measuresLabel'”,
columnsLabel: “Translated ‘columnsLabel'”,
rowsLabel: “Translated ‘rowsLabel'”,
fieldsLabel: “Translated ‘fieldsLabel'”
};
kendo.ui.PivotGrid.fn.options.messages = {
measureFields: “Translated measure fields”,
columnFields: “Translated column fields”,
rowFields: “Translated row fields”
};
</script>
<script>
$(document).ready(function () {
var pivotgrid = $(“#pivotgrid”).kendoPivotGrid({
filterable: true,
columnWidth: 200,
height: 580,
dataSource: {
type: “xmla”,
columns: [{ name: “[Date].[Calendar]”, expand: true }, { name: “[Product].[Category]” } ],
rows: [{ name: “[Geography].[City]” }],
measures: [“[Measures].[Internet Sales Amount]”],
transport: {
connection: {
catalog: “Adventure Works DW 2008R2”,
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”);
});
</script>
</div>