When I update a value in the grid on edit I need to update a field with the value of a users session variable.
I know this doesn’t work but maybe it gives you an idea of what I am trying to do:
$col = array();
$col[“title”] = “Processor”; // caption of column, can use HTML tags too
$col[“name”] = “processed_by”; // grid column name, same as db field or alias from sql
$col[“editable”] = true;
array(“list”=>true, “add”=>false, “edit”=>true, “view”=>true, “bulkedit”=>false);
$cols = $col;
Best way to do this is to use on_update event. e.g.
$e["on_update"] = array("update_data", null, true);
$data["params"]["processed_by"] = $_SESSION["accounts_sak"];
Refer this link for more details:
Abu Ghufran - Dev Team
Grid 4 PHP Framework
will that update the field for only the row that I edited? Not the entire table right?
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?