columns

Gets 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();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(columns);// [{ name: ["[Date].[Calendar]"] }]
</script>
In this article