PivotGrid概述

Kendo UI PivotGrid以交叉表格格式表示多维数据。

jQuery Kendoka图像的剑道UI

PivotGrid是jQuery的剑道UI,一个具有 110+ 组件的专业级UI库,用于构建现代和功能丰富的 应用程序。想要试用它,可以注册一个30天的免费试用期。

Тhe new PivotGridV2现已可用。它提供了全新的设计和新的面向未来的架构,允许实现许多即将到来的功能。由于PivotGridV2旨在取代传统的数据透视网格,建议在您的新项目中使用数据透视gridv2。有关PivotGrid和PivotGridV2之间差异的信息,请参阅比较篇文章。

基本配置

  1. 首先初始化PivotGrid小部件。通过定义HTML创建小部件

    元素。
    <!——定义HTML div来保存数据透视网格——> 
  2. 配置PivotGrid以与托管的Adventure Works立方体一起工作https://demos.telerik.com

    <脚本>美元(文档)。Ready (function () {$("#pivotgrid")。kendoPivotGrid({height: 200, //定义小部件的高度。dataSource: {type: "xmla", //定义类型。列:[{名称:"[日期]。[Calendar]"}], //指定列的维度。rows:[{名称:"[产品]。[Category]"}], //在行上指定一个维度。措施:["(措施)。[网络销售额]"],//指定要显示的指标。 transport: { connection: { catalog: "Adventure Works DW 2008R2", // Specify the name of the catalog. cube: "Adventure Works" // Specify the name of the cube. }, read: { url: "https://demos.telerik.com/olap/msmdpump.dll", // Define the URL of the service. dataType: "text", contentType: "text/xml", type: "POST" } }, schema: { type: "xmla" // Specify the type of the schema. }, } }); }); 
  3. 前面的示例输出以下结果。

    一个示例Kendo UI数据透视网格

    功能和特性

    引用现有实例

    要引用现有的数据透视网格实例,请使用jQuery.data ()方法。建立了引用之后,使用PivotGrid API控制它的行为。

    下面的示例演示如何访问现有的PivotGrid实例。

    var pivotgrid = $("#pivotgrid").data("kendoPivotGrid");

    另请参阅

在本文中
Baidu
map