Sunday, 15 August 2010

extjs4.1 - Formatting ExtJS grid column -


I know that I can format an ExtJs grid column using the class. I want to know how I can implement the following format types:

  1. Showing percent symbol without multiplying by 100 percent for the number. So if the value is 10.34, then it should show 10.34% and now 1034%.
  2. If the number is negative then it should be shown in red in the inset bracket. So -23 should be shown in red (23).

    thanks

    : Value;}

    Frankenstein's monster:

      Renderer: function (value) {return value & lt; 0? '& Lt; span style = "Color: red"> ('+ Math.abs (value) +'%) : value + '%';}    < / Html>

No comments:

Post a Comment