what does documentation of the component mean ? The ordering in the spec file ?
https://js.devexpress.com/Demos/WidgetsGallery/Demo/Pivot_Grid/LocalDataSource/AngularJS/Light/
elements.Pivot_Grid_2.pivot(data);
$scope.api.pivot = function(data) {
console.log(data);
source = data;
$scope.pivotGridOptions = {
allowSortingBySummary: false,
allowSorting: false,
allowFiltering: false,
allowExpandAll: false,
height: 440,
showBorders: false,
fieldChooser: {
enabled: false
},
dataSource: {
fields: [{
dataField: "city",
area: "row"
},
{
dataField: "telephone_nr",
area: "column"
}, {
dataField: "sys_owner_id",
area: "data"
}],
store: source
}
};
}
$scope.pivotGridOptions = {
allowSortingBySummary: true,
allowSorting: true,
allowFiltering: true,
allowExpandAll: true,
...
}
<div id="sales" dx-pivot-grid="pivotGridOptions"
class="pivotGrid"
>
</div>
controller: function($scope, $element, $attrs) {
var source="";
// var datasource;
$scope.api.pivot = function(data) {
console.log(data);
source = data;
$scope.pivotGridOptions = {
allowSortingBySummary: false,
allowSorting: false,
allowFiltering: false,
allowExpandAll: false,
height: 440,
showBorders: false,
fieldChooser: {
enabled: false
},
dataSource: {
fields: [{
dataField: "city",
area: "row"
},
{
dataField: "telephone_nr",
area: "column"
}, {
dataField: "sys_owner_id",
area: "data"
}],
store: source
}
};
}
},
$scope.servoyApi.callServerSideApi("mycallback",["test",1]).then(function(retValue) {
console.log(retValue);
})
$scope.mycallback = function(name,type) {
return "something";
}
Users browsing this forum: No registered users and 16 guests