Keep it Simple... FlexiGrid

1,027 views
Skip to first unread message

SeanJon Nay

unread,
Jun 15, 2013, 4:46:17 PM6/15/13
to flex...@googlegroups.com
i'm trying to keep my PHP/Json simple, but not spitting out data :(


PHP:
while($Ro = $db -> fetch_assoc($Re)){ $ThisArray[] = array( 'A' => $Ro['Alliance'], 'C' => (int)$Ro['iCount'] ); }
echo json_encode($ThisArray);

JS:
$("#testtable").flexigrid({
url: 'AjaxPulls.php?get=AllianceStatus&Status=1&YAlliance=MyGuild&Terr=This&Quad=That',
dataType: 'json',
colModel : [
{display: 'Alliance', name : 'A', width : 150, sortable : true, align: 'center'},
{display: '#', name : 'C', width : 150, sortable : true, align: 'center'}
],
title: 'Our Status',
sortname: "C",
sortorder: "asc",
usepager: false,
useRp: false,
showTableToggleBtn: true,
width: 300,
height: 200
}); 

It will create the grid, but no data is shown, I checked the array, it was valid.. Am I missing something?

Serdar Sanrı

unread,
Jun 23, 2013, 12:53:27 AM6/23/13
to flex...@googlegroups.com

You gotta use json_encode($array, true)

--
You received this message because you are subscribed to the Google Groups "Flexigrid for jQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flexigrid+...@googlegroups.com.
To post to this group, send email to flex...@googlegroups.com.
Visit this group at http://groups.google.com/group/flexigrid.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages