Hi Abu,
****CODE1******
…
$col["name"] = "qty1";
$col["editable"] = true;
…
$col["name"] = "qty2";
$col["editable"] = true;
…
function test($data)
{
if ($data["params"]["qty1"]<$data["params"]["qty2"]) {phpgrid_error("error");}
}
****CODE2******
…
$col["name"] = "qty1";
$col["editable"] = true;
…
$col["name"] = "qty2";
$col["editable"] = false;
…
function test($data)
{
if ($data["params"]["qty1"]<$data["params"]["qty2"]) {phpgrid_error("error");}
}
********************
The CODE1 is work fine,but the CODE2 is not work.
Why I can not get the value of qty2 at CODE2 (using $data["params"]["qty2"] )??
Rgds,
The reason for code2 is
$col["editable"] = false;
Non editable data is not posted by grid.
If you want it in function, you can make it editable->true, and keep it hidden.
You can also make another column with same column for display purpose.
$col["name"] = "qty2";
$col["editable"] = true;
$col["hidden"] = true;
..
$col["name"] = "qty2-temp";
$col["editable"] = false;
…
Please how can I access the value of a col to use in a custom sql query
e.g.
$col["title"] = "School";
$col["name"] = "school";
….
$col["title"] = "Department";
$col["name"] = "department";
$schlquery = "select * from department WHERE schoolid='{school}'";
Is this possible?
I am using a paid version of the phpgrid
I can't understand your query.
Please share code / screenshot. You can also email me at [email protected]
PS: Create a new ticket as it seems different case.