setDataSource
Sets the data source of the widget.
Parameters
dataSource kendo.data.PivotDataSourceV2
The data source to which the widget should be bound.
Example - set the data source
<div id="configurator"></div>
<script>
$("#configurator").kendoPivotConfiguratorV2({
dataSource: {
type: "xmla",
columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Geography].[City]" } ],
rows: [{ name: "[Product].[Product]" }],
measures: ["[Measures].[Internet Sales Amount]"],
transport: {
connection: {
catalog: "Adventure Works DW 2008R2",
cube: "Adventure Works"
},
read: 'https://demos.telerik.com/olap/msmdpump.dll'
}
}
});
var dataSource = new kendo.data.PivotDataSourceV2({
type: "xmla",
columns: [{ name: "[Date].[Calendar]", expand: true }],
rows: [{ name: "[Product].[Product]" }],
measures: ["[Measures].[Internet Sales Amount]"],
transport: {
connection: {
catalog: "Adventure Works DW 2008R2",
cube: "Adventure Works"
},
read: 'https://demos.telerik.com/olap/msmdpump.dll'
}
});
setTimeout(function(){
var configurator = $("#configurator").data("kendoPivotConfiguratorV2");
configurator.setDataSource(dataSource);
}, 2000);
</script>