A little tip when using flexigrid with JQuery 1.4 ++
April 11, 2011 Tinggalkan sebuah Komentar
a little tip for you who uses flexigrid with JQuery 1.4 or a higher version.
The data wont show before you change your PHP script for generate Json into these code…
$json = '';
$json .= '{';
$json .= '"page": "'.$page.'",';
$json .= '"total": "'.$total.'",';
$json .= '"rows": [';
$rc = false;
while ($row = mysql_fetch_array($result)) {
if ($rc) $json .= ",";
$json .= '{';
$json .= '"id": "'.$row['id'].'",';
$json .= '"cell":["'.$row['id'].'","'.$row['iso'].'"';
$json .= ',"'.addslashes($row['name']).'"';
$json .= ',"'.addslashes($row['printable_name']).'"';
$json .= ',"'.addslashes($row['iso3']).'"';
$json .= ',"'.addslashes($row['numcode']).'"]';
$json .= '}';
$rc = true;
}
$json .= "]";
$json .= "}";
echo ($json);
hope this help.
I waste my time for this before finally got the solution.