After successfully creating a custom filter for my ui-grid that limits decimal numbers to two places and exporting it as a pdf using ui-grid-exporter, I encountered an issue. The filter works fine when exporting the main ui-grid but fails to apply within the footer upon exportation.
Footer Expected: 32.34452436927346234523623462342345 Needed: 32.34
Below is the custom filter which functions properly within the ui-grid.
app.filter('rentalFilter', function () {
return function (value, scope) {
// Filter logic goes here
};
});
The code snippet shows how columns are defined for the ui-grid:
$scope.columns = [
// Column definitions go here
];
For exporting the ui-grid as a pdf with numbers displayed up to two decimal places, the following function is utilized:
$scope.export = function(){
// Export logic here
}
However, applying the same functionality to the 'getFooterValue' function proved challenging:
$scope.getFooterValue = function(i){
// Footer value retrieval logic here
}
To address the issue of limiting values in the footer to 2 decimal points during export, adjustments need to be made. Any tips or suggestions on achieving this would be greatly appreciated.