This is my PHP code:
include(PHPGRID_LIBPATH . "inc/jqgrid_dist.php");
$db_conf = array(
"type" => PHPGRID_DBTYPE,
"server" => PHPGRID_DBHOST,
"user" => PHPGRID_DBUSER,
"password" => PHPGRID_DBPASS,
"database" => PHPGRID_DBNAME
);
$g = new jqgrid($db_conf);
$opt["autowidth"] = true;
$opt["forceFit"] = true;
$opt["rownumbers"] = true;
$opt["rownumWidth"] = 50;
$opt["rowNum"] = 20;
$opt["autoresize"] = true;
$opt["resizable"] = false;
$opt["altRows"] = true;
$opt["height"] = "100%";
$opt["toolbar"] = "top";
$opt["toppager"] = true;
$opt["pgbuttons"] = true;
$g->table = $nav;
$g->set_options($opt);
$g->set_actions(array(
"autofilter" => false,
"export" => true,
"search" => "simple",
"export_excel" => true,
"export_pdf" => true,
"export_csv" => true,
"export_html" => true,
));
$table = $g->render("table");
and HTML:
<!DOCTYPE html>
<html lang="it">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Scuola Steiner Varese</title>
<link rel="stylesheet" type="text/css" media="screen" href="lib/js/jqgrid/css/ui.jqgrid.css" />
<link rel="stylesheet" href="https://code.jquery.com/ui/1.14.0/themes/pepper-grinder/jquery-ui.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" integrity="sha384-4LISF5TTJX/fLmGSxO53rV4miRxdg84mZsxmO8Rx5jGtp/LbrixFETvWa5a6sESd" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.14.0/jquery-ui.min.js" integrity="sha256-Fb0zP4jE3JHqu+IBB9YktLcSjI1Zc6J2b6gTjB0LpoM=" crossorigin="anonymous"></script>
<script src="lib/js/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="lib/js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.9.2/umd/popper.min.js"></script>
</head>
<body>
<div class="col py-3">
<?php echo $table ?>
</div>
</body>
I cannot add a working snippet since I was not able to find a CDN for Grid 4 PHP.
From the options listed here I expect to have the toolbar placed on top (correct) with the pager controls. Instead they are not there:
If I place the toolbar on bottom side, the pager controls are available.
How to have the pager controls on top side as well?