Currently i have a working Grid that uses a virtual (non-db) column to display a message inside the add and edit dialogs. The important parameters of the configuration are the following:
$col[“title”] = “WARNING:”; //the content of the field is set in the afterShowForm function
$col[“name”] = “virtual_col”;
$col[“show”] = array(“view”=>false, “add”=>true, “edit”=>true, “list”=>false);
$col[“editoptions”] = array(“readonly”=>”readonly”, “style”=>”border:0”);
When I try to update any row, the DB expectedly returns the error: “Unknown column ‘virtual_col’ in ‘field list’”
I suppose I can work around that error defining on_insert and on_update functions and not including ‘virtual_col’ to be used in the custom query, is there an easier way to solve this? I have a lot of columns in that Grid, so the functions would be pretty big and I’d avoid that approach if it’s possible.
Thanks in advance
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?