I have problem adding a new row of data to subgrid, however, edit and delete functions are working perfectly fine.
Whenever I add a new row of data, the data is updated in my MySQL database, but the parent table primary key did not link together, that is why the new row of data won't appear in client side.
E.g.,
Parent: Order (PK: OrderID)
Child: Hardware (PK: HardwareID)
For Order 1, there is Hardware 1.
I add new Hardware inside Order 1, by right there will be Hardware 1 and Hardware 2 appearing inside Order 1, but my problem here is Hardware 2 is not added to Order 1.
Below is my code:
order_details.php — Parent
session_start();
ob_start();
require_once 'config.php';
// include the jqGrid Class
require_once “php/jqGrid.php”;
// include the PDO driver class
require_once “php/jqGridPdo.php”;
// include the datepicker
require_once “php/jqCalendar.php”;
// Connection to the server
$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);
// Tell the db that we use utf-8
$conn->query(“SET NAMES utf8″);// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Write the SQL Query
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top