How to produce kendo-grid
with different data for each iteration of ng-repeat
?
HTML code:
<div ng-repeat="PricesPerGroup in AllGroups">
<kendo-grid options="GridOptions"></kendo-grid>
</div>
JavaScript code:
$scope.GridOptions = {
dataSource: {
data: {
(data is current 'PricesPerGroup' - Should bring it from ng-repeat)
}
}
}
Try to use helper function that would return proper config object:
<div ng-repeat="PricesPerGroup in AllGroups">
<kendo-grid options="getGridOptions(PricesPerGroup)"></kendo-grid>
</div>
And in controller:
$scope.getGridOptions = function(data) {
return {
dataSource: {
data: data
}
};
};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.