For formatting at display mode … you need to use custom formatter function.
e.g. formatter of percentage display
$col["formatter"] = "function(cellval,options,rowdata){ return cellval*100+'%'; }";
$col["unformat"] = "function(cellval,options,cell){ return cellval.replace('%','')/100; }";
For formatting at edit mode …. refer this faq.
Q) How to mask a field, for example like this: (NN) NNNN-NNNN ? N stands for number.
You can however, pick input jquery id selectors, and linking them using any lib.
for e.g. http://igorescobar.github.io/jQuery-Mask-Plugin/
Most likely, you would need to code it after show form event. for e.g. if ID of element id "date"
$grid["add_options"]["afterShowForm"] = 'function(formid) { jQuery("#total").mask("0,000.00"); }';
$grid["edit_options"]["afterShowForm"] = 'function(formid) { jQuery("#tatal").mask("0,000.00"); }';
$g->set_options($grid);