Hello Paramvir,
Sorry to make a thread again on the same setup,
but all of them now can be seen in here, could you take a look?
http://masterplan.pw/Right now remote sorting is not working and acting funny if you click at the header and I suspected it mixed up with remote filtering API (and perhaps remote paging),
also I need to make header filter with 'AND' filter while toolbar filter with 'OR', can it be done? right now can only be done with one of them.
The other thing is the extra column to fill the flex detail grid,
I couldn't reproduce in the plunkr even with the same settings,
maybe it has something to do with javascript-detect-element-resize/jquery.resize.js ?
Here's the updated plurk (cannot reproduce) :
https://plnkr.co/edit/LOvrSsYMvqgaUo4BXyj9?p=previewand here's my API code :
// other settings for job and classes
// Execute job to get all tickets
if($job == 'get_tickets')
{
if (isset($_GET["pq_curpage"]) && isset($_GET["pq_rpp"]) ){
$filterQuery = "";
$filterParam = array();
if ( isset($_GET["pq_filter"]))
{
$pq_filter = $_GET["pq_filter"];
$dsf = FilterHelper::deSerializeFilter($pq_filter);
$filterQuery = $dsf->query;
$filterParam = $dsf->param;
}
if (isset($_GET["pq_sort"])) {
$pq_sort = $_GET["pq_sort"];
$sortQuery = SortHelper::deSerializeSort($pq_sort);
}
$pq_curPage = $_GET["pq_curpage"];
$pq_rPP=$_GET["pq_rpp"];
$sql = "Select count(*) from noc_tickets";
$stmt = $dbh->query($sql);
$total_Records = $stmt->fetchColumn();
$skip = ($pq_rPP * ($pq_curPage - 1));
if ($skip >= $total_Records)
{
$pq_curPage = ceil($total_Records / $pq_rPP);
$skip = ($pq_rPP * ($pq_curPage - 1));
}
// Get tickets
$sql ="SELECT * FROM noc_tickets ORDER BY `TicketNo` DESC limit ".$skip." , ".$pq_rPP." ".$filterQuery;
if ( isset($_GET["pq_filter"]))
{
$sql = "SELECT * FROM noc_tickets ORDER BY `TicketNo` DESC" .$filterQuery;
}
if ( isset($_GET["pq_filter"]))
{
$sql ="SELECT * FROM noc_tickets".$sortQuery;
}
$stmt = $dbh->prepare($sql);
$stmt->execute($filterParam);
if (!$stmt){
$result = 'error';
$message = 'query error';
} else {
$result = 'success';
$message = 'query success';
$mysql_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
}
}
// Prepare data
$data = array(
"result" => $result,
"message" => $message,
"totalRecords" => $total_Records,
"curPage" => $pq_curPage,
"data" => $mysql_data,
);
// Convert PHP array to JSON array
$json_data = json_encode($data);
print $json_data;
}
Thank you