Hi. I am pretty new with tis and I am not sure how to ask this.
But when I created my first grid I noticed that they wanted me to use the standard HTML page tags, Document, HTML, Head, Body, etc….
When I remove these tags it throws off the display of the grid.
Eventually I would like to implement this as a dynamic include. I am pretty sure how to do that but how can I get the grid to display properly without the standard HTML page tags?
ok so the following code works as standalone. But if I try to use the file as an include it will create the grid frae but then throws an error and not populate the grid frame with data.
PHPGRID_DBTYPE,
"server" => PHPGRID_DBHOST,
"user" => PHPGRID_DBUSER,
"password" => PHPGRID_DBPASS,
"database" => PHPGRID_DBNAME
);
$g = new jqgrid($db_conf);
// set few params
$opt["caption"] = "Sample Grid";
$g->set_options($opt);
// set database table for CRUD operations
$g->table = "clients";
// render grid and get html/js output
$out = $g->render("list1");
?>
Hello,
Correct way to is to place the php datagrid code – till render() function – above any html code. If you put datagrid code after html tags then it will not render.
You can then use echo $out statement where in html you want to show the datagrid.
It is mentioned in this article: https://www.gridphp.com/docs/creating-first-grid/