How to use converters in cell.renderer in data grids
Summary
How to use converters in cell.renderer in data gridsContent
Hello experts,
I am trying to replicate the JET Cookbook data grid on to VBCS.
link -- https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=dataGrid&demo=overView
However, I am unable to get the taxConverter and currencyConverter to work
1st approach:
<oj-bind-text value="[[ $parent.currencyConverter.format($context.data)]]"></oj-bind-text>
var PageModule = function PageModule() {
var currencyOptions =
{
style: 'currency',
currency: 'USD',
currencyDisplay: 'symbol'
};
this.currencyConverter = new NumberConverter.IntlNumberConverter(
currencyOptions);
this.taxConverter = new NumberConverter.IntlNumberConverter(
{ style: 'percent', minimumFractionDigits: 2 });
};
2nd Approach:
<oj-bind-text value="[[ $parent.functions.getCurrencyConverter($context.data)]]"></oj-bind-text>