Edit this page

columns

Get or sets the columns configuration.

Parameters

val Array

The columns configuration. Accepts the same values as the columns option.

Returns

Array the current columns configuration.

Example - set the columns

<script>
var dataSource = new kendo.data.PivotDataSource({
  type: "xmla",
  transport: {
    connection: {
        catalog: "Adventure Works DW 2008R2",
        cube: "Adventure Works"
    },
    read: "https://demos.telerik.com/olap/msmdpump.dll"
  },
  schema: {
    type: "xmla"
  }
});

dataSource.columns(["[Date].[Calendar]"]);
</script>

Example - get the columns name

<script>
var dataSource = new kendo.data.PivotDataSource({
  type: "xmla",
  columns: ["[Date].[Calendar]"],
  transport: {
    connection: {
        catalog: "Adventure Works DW 2008R2"
    },
    read: "https://demos.telerik.com/olap/msmdpump.dll"
  },
  schema: {
    type: "xmla"
  }
});

var columns = dataSource.columns();
console.log(columns);// [{ name: ["[Date].[Calendar]"] }]
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy