Hi
I tried the below to highlight a detail row that has the same phone# as the master but it did not have any effect. Is this possible?
In the master I have
$agrid_options["subgridparams"] = "phone,street";
In detail I have
$id = intval($_GET["rowid"]);
$master_phone = intval($_GET["phone"]);
$aformat = array();
$aformat["column"] = "phone";
$aformat["op"] = "eq";
$aformat["value"] = "{$master_phone}";
$aformat["css"] = "'background-color':'teal'";
$aformat_all[] = $aformat;
$ogrid->set_conditional_css($aformat_all);
Thanks
Glenn
Your code seems fine. If you have some online link to see the problem, please share it.
You can also email me at [email protected]
Thanks Abu,
He is a link to the problem. I updated the master-detail example. Added code and the field sex to the detail database.
http://websalesdesign.com/proj/lib/phpgrid-full/demos/master-detail/master-detail.php
Glenn
Hello,
Following changes will make it functional.
Code: http://hastebin.com/fahefihuwi.php
line 94: Added a new field master_gender with constant value of $gender
$grid->select_command = "SELECT id,client_id, sex, '$gender' as master_gender, invdate,amount,tax,note,total,'$company' as 'company' FROM invheader WHERE client_id = $id";
line 128: Use constant column data
$col["name"] = "master_gender";
line 185: set virtual column in formatting
$aformat["value"] = "{master_gender}";