I need to add leading 00 to anythig added to a grid.
In the insert funtion I have
$data["params"]["FundCode"] = substr('00'.$data["params"]["FundCode"],-2);
but it is not working.
– The FundCode case must match the $col["name"]
– The leading zero code logic can be verified by debugging $data at end of function
– If you pass last argument as true, functions will act as a data filter, and insert/update will be performed by grid. e.g.
$e["on_insert"] = array("add_client", null, true);
You can put following code inside event handler to see $data content.
$str = ob_get_clean();
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?