1
0
-1

This work


1.Formatting number 

{{type:'numeric',numericFormat:{pattern:'0.000'}}}  (Works Okay)

2. Formatting Color works

{{

renderer:function(instance, td, row, col, prop, value, cellProperties)

{

Handsontable.renderers.TextRenderer.apply(this, arguments);td.style.backgroundColor = '#FDE9D9';

}

}}   (Works Okay)


3. combining the above two does not work.  

{ {

type:'numeric',numericFormat:{pattern:'0.00'},

renderer:function(instance, td, row, col, prop, value, cellProperties) 

{

Handsontable.renderers.TextRenderer.apply(this, arguments) ; td.style.backgroundColor = '#FDE9D9';

}

}}  Does not work. The spread sheet shows values 9.999999 when it should show 9.99


Example 

{{

type:'date',dateFormat:'MM/DD/YYYY' ,

renderer:function(instance, td, row, col, prop, value, cellProperties)

{

Handsontable.renderers.TextRenderer.apply(this, arguments);td.style.backgroundColor = '#D8E4BC';

}

}} This works as well.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi, this looks like something to do with the handsontable library. Personally I am not so familiar with it, perhaps you might want to try asking in the handsontable forum https://forum.handsontable.com/? There might be more relevant expertise there.

        CommentAdd your comment...