I am trying to show or hide the rowaction icons in the slave table.
But they should only be shown, if in the master table the value of a given cell is true. Therefore I subgridparams="invoice" this cell to the slave. In the slave I am doing this: $value = intval($_GET["invoice"]). Later I have this code:
"rowactions" => $value,
Unfortuantely this does not work. It seems as if this value can NOT be changed but has to be "hardcoded".
Or am I making a mistake?
Yes, thats true. This value should be hardcoded.
What you can do is to disable edit/delete operation when certain cell value is true.
For this, you need to set master column value as slave grid sql.
$company = $_GET["invoice"];
$grid->select_command = "SELECT id,client_id,invdate,amount,tax,note,total,'$invoice' as 'invoice' FROM invheader WHERE client_id = $id";
Second, create a invoice column in slave grid, that will have master grid value (static).
Apply column access JS code to disable edit/del operations when invoice value of selected row is true.
Refer demos/editing/column-access.php for js demo.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?