Dear Sir/Madam,
I purchased the license and would like to know how I can change the display format in cell, for example the field contain the value 0.5 and I would like to display it as 50% but keeping the value as 0.5 when edit?
Best regards,
Kelvin.
For custom formatter of percentage display
$col["formatter"] = "function(cellval,options,rowdata){ return cellval/100+'%'; }";
$col["unformat"] = "function(cellval,options,cell){ return cellval.replace('%','')*100; }";
The formula would be different. Posted opposite.
$col["formatter"] = "function(cellval,options,rowdata){ return cellval*100+'%'; }";
$col["unformat"] = "function(cellval,options,cell){ return cellval.replace('%','')/100; }";
I found you can put HTML in a <textbox> and it will not render as html so I did this
$col["formatter"] = "function(cellval,options,rowdata){ return '<textarea cols="3000" rows="1">'+cellval+'</textarea>'; }";
$col["unformat"] = "function(cellval,options,cell){ return cellval; }";
I made a text box 3000×1 as my cellval field in the DB is a varchar 3000
it works great