Hi,
is there any format option for thousandseparator and decimalSeparator for table decimal and numeric cell values.
Thank you.
Try $col["formatter"] = "number"; with column config.
$col = array();
$col["title"] = "Total";
$col["name"] = "total";
$col["width"] = "50";
$col["editable"] = true;
$col["formatter"] = "number";
Hi Abu,
$col["formatter"] = "number";
Yes, it works perfect in phpgrid for formatting numeric columns with thousandseparator and decimalseparator.
is it possible to use numeric formatter in add and edit dialogs or online editing when during adding and editing?
Thank you very much.
Regars…
Yes, you can have it, but you might need to pass the posted data through some filter. For e.g. on_insert and on_update, and make it compatible with database.
// when 3rd argument true, fnuction will act as a filter for data.
$e["on_update"] = array("update_filter", null, true);
function update_filter(&$data)
{
$data["params"]["num"] = str_replace(",","",$data["params"]["num"]);
}