Forum
17:23
28/07/2013
I tried to pass in PostData that is calculated in runtime, but it doesnot work.
Something simple like this doesnot work($uid is not calculated in runtime):
$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);
jqGridDB::query($conn,"SET NAMES utf8");
$grid = new jqGridRender($conn);
$query= 'SELECT employeename FROM employees where uid =?';
$grid->SelectCommand = $query;
$grid->dataType = 'json';
$uid=$_REQUEST['uid'];
$uid=($uid+2)/9;
$aux = array($uid);
// Let the grid create the model
$grid->setColModel(null, $aux);
// Set some grid options
$grid->setGridOptions(array(
"rowNum"=>10,
"height"=>"200″,
"rowList"=>array(10,20,30),
"sortname"=>"id",
"postData"=>array("uid"=>$uid)
));
$grid->renderGrid('#grid','#pager',true, null, $aux, true,true);
Called using ?uid=16 in my URL. ((16+2)/9=2. When I used $uid=2 in replace of $uid=$uid/9+2 and it works fine but I need $uid to be calculated in run time -In the future, I need to encrypt the uid passed in as REQUEST parameter.).
Does JQGrid support real time calculation of the PostData, or is the PostData precalculated in someway since the above simple example doesnot work?
Thanks in advance.
Most Users Ever Online: 715
Currently Online:
46 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66