I have a problem, whatever i do my subgrid stay empty.
in my parent I have
$opt[“subGrid”] = true;
$opt[“subgridurl”] = “Function/IngredientRecipe.php”;
$opt[“subgridparams”] = “RecipeId”;
in the IngredientRecipe.php i have :
$_SESSION[“RecipeId”] = $_POST[“RecipeId”];
$id = $_SESSION[“RecipeId”];
$g->select_command = “SELECT ri.* FROM RecipeIngredients AS ri WHERE RecipeId = $id”;
and my grid appear normally but the subgrid is empty (no line just white space)
To debug, open browser debug console (F12) > network tab. And then open subgrid. It will send an ajax call to new page. Now right click on that request and select open in new tab.
It will show correct details about the output and possible error on subgrid page. You can also check php error log for reason behind blank output.
Abu Ghufran - Dev Team
PHP Grid Framework
Thank you for your fast reply, when I open the debug console network and open the subgrid (clicking on the arrow for expend) there is no Ajax request, like if $opt[“subgridurl”] = “Function/IngredientsRecipe.php”; was never executing.
When I do and call directly :
$g = new jqgrid($db_conf);
$opt[“caption”] = “Surowców”;
$g->select_command = “SELECT ri.* FROM RecipeIngredients AS ri WHERE RecipeId = 16”;
$content = $g->render(“ListIngredients”);
it’s working and show me a normal grid but when I want to put it in subgrid with the code of my first message is not working. do “subgrid_detail.php” so in my case “Function/IngredientRecipe.php” require something else than query and code seen in my first message ?
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!