Custom data
Directive
<div ngc-table
data="data"
custom-data-value-fn="customDataFn"
left-column-number="3" left-column-widths="'40px'"
center-column-number="10" center-column-widths="['40px']"
right-column-number="2" right-column-widths="['40px']"
header-row-number="2" header-row-heights="['15px', '15px']"
row-number='15' row-heights="['15px', '15px']"
footer-row-number="3" footer-row-heights="'15px'">
</div>
Controller
angular.module('ngcTableDirectiveTest', ['ngcTableDirective'])
.controller('TestCtrl', function($scope) {
$scope.data = [];
for (var row = 0; row < 1000; row++) {
var rowContent = [];
for (var col = 0; col < 1000; col++) {
rowContent.push(row * col + col);
}
$scope.data.push(rowContent);
}
$scope.customDataFn = function(data, row, col) {
return data[1000 - row - 1][1000 - col - 1];
}
});