View Full Version : Grid data render as a percentage

6 Nov 2010, 1:48 PM
Can anyone help me with a column renderer to render the value in the column as a percentage?

I have googled, read the API and searched the forum. Everyrhing I can fin about perentage is about object widths.

thanks in advance.

6 Nov 2010, 2:45 PM
function percent(value, metadata, record) {
return [value * 100, '%'].join('');

And in your column definition, set 'render: percent'.

Of course for something this general you probably want to be smarter about how you're organizing your custom renderers.