Hi All
First, This is AWESOME!
I am trying to save to a table.
I have a master grid and a detail grid.
The master grid saves perfectly.
The issue is the child/detail grid.
it uses this code…
$e["on_insert"] = array("add_member", null, true);
$grid->set_events($e);
function add_member(&$data)
{
$id = intval($_GET["rowid"]);
$data["params"]["FamilyIDFK"] = $id;
}
I can't find an example so I'm asking.
I need to save the client_id which is pulled from a session.
Right now, it saves the FamilyIDFK as a 1 but it souuld puul the FamilyID used
in the Master grid.
Im using…
// receive id, selected row of parent grid
$id = intval($_GET["rowid"]);
$address = $_GET["Address1"];
$city = $_GET["City"];
$cid = intval($_GET["FamilyID"]);
…to pull the row number and $id seems to word (my sql statement likes it),
but when I save in the child table, the $id seems to be reset to 1.
How do I fix this?
Ok,
I figures out how t save
function add_member(&$data)
{
$id = intval($_GET["rowid"]);
$data["params"]["Person"] = $id;
$data["params"]["client_id"] = $_SESSION['client'];
$mid = intval($_GET["rowid"]);
$data["params"]["FamilyIDFK"] = $mid;
}
but How do I save data grabed for the masteer grid?
FamilyIDFk is FamilyID used in the master grid not the child so
inteval($_GET["rowid"}) is returning the wrong value.