温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Kendo UI for jQuery数据管理使用中如何将行标题字幕显示为锚点

发布时间:2021-09-18 10:04:37 阅读:180 作者:柒染 栏目:编程语言
前端开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

Kendo UI for jQuery数据管理使用中如何将行标题字幕显示为锚点,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

Kendo UI for jQuery R1 2021 SP2试用版下载

Kendo UI是带有jQuery、Angular、React和Vue库的JavaScript UI组件的最终集合,无论选择哪种JavaScript框架,都可以快速构建高性能响应式Web应用程序。通过可自定义的UI组件,Kendo UI可以创建数据丰富的桌面、平板和移动Web应用程序。通过响应式的布局、强大的数据绑定、跨浏览器兼容性和即时使用的主题,Kendo UI将开发时间加快了50%。

PivotGrid允许您将标题呈现为锚点。

要将列标题和单元格标题字段呈现为锚点,请分别使用columnHeaderTemplate或dataCellTemplate选项。

要将行标题字段呈现为锚点,请使用rowHeaderTemplate选项,下面的示例演示如何实现此操作。

<script src="https://demos.telerik.com/kendo-ui/content/shared/js/products.js"></script>

<div id="example">
<div id="pivotgrid"></div>

<script id="headerTemplate" type="text/x-kendo-tmpl">
# if (!member.children.length && member.parentName === "ProductName") { #
<a href="https://www.telerik.com">#: member.caption #</a>
# } else { #
#: member.caption #
# } #
</script>

<script>
$(document).ready(function () {
var pivotgrid = $("#pivotgrid").kendoPivotGrid({
rowHeaderTemplate: $("#headerTemplate").html(),
columnWidth120,
height570,
dataSource: {
data: products,
schema: {
model: {
fields: {
ProductName: { type"string" },
UnitPrice: { type"number" },
UnitsInStock: { type"number" },
Discontinued: { type"boolean" },
CategoryName: { field"Category.CategoryName" }
}
},
cube: {
dimensions: {
ProductName: { caption"All Products" },
CategoryName: { caption"All Categories" },
Discontinued: { caption"Discontinued" }
},
measures: {
"Sum": { field"UnitPrice"format"{0:c}"aggregate"sum" },
"Average": { field"UnitPrice"format"{0:c}"aggregate"average" }
}
}
},
rows: [{ name"CategoryName"expandtrue }, { name"ProductName" } ],
columns: [{ name"Discontinued"expandtrue }],
measures: ["Sum"]
}
}).data("kendoPivotGrid");

$("#configurator").kendoPivotConfigurator({
dataSource: pivotgrid.dataSource,
height570
});
});
</script>
</div>

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注亿速云行业资讯频道,感谢您对亿速云的支持。

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

原文链接:https://my.oschina.net/u/3992677/blog/5008534

AI

开发者交流群×