You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to use converters in cell.renderer in data grids

edited Jun 29, 2020 5:04AM in Visual Builder 4 comments

Summary

How to use converters in cell.renderer in data grids

Content

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>

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!