1
0
-1

{{renderer:function(instance, td, row, col, prop, value, cellProperties){Handsontable.renderers.TextRenderer.apply(this, arguments);td.style.backgroundColor = '#D8E4BC';}

,
renderer:function(instance, td, row, col, prop, value, cellProperties){Handsontable.renderers.TextRenderer.apply(this, arguments);td.style = 'numeric';}

}}


Would like to do two things change color and use numeric with 0.00 using Custom properties .


    CommentAdd your comment...

    3 answers

    1.  
      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.


      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.  
        1
        0
        -1

        Hey Justin It does not work I tested it. did you test it ?

          CommentAdd your comment...
        1.  
          0
          -1
          -2

          Hi, perhaps you can try it like this?

          {
             {
                 renderer: function(instance, td, row, col, prop, value, cellProperties) {
                     Handsontable.renderers.TextRenderer.apply(this, arguments);
                     td.style.backgroundColor = '#D8E4BC';
                     td.style = 'numeric';
                 }
             }
          }
            CommentAdd your comment...