Hi All:
When a user tries to export a grid that has more than $gSQLMaxRows the web page bombs out and generates a php memory exceeded error.
I am trying to hide or show the export icon on the pager using the following code:
[ code language=”php”]
$Recs =<<<RECS
function(data,status) {
var numrecs = data.records;
}
RECS;
$setNav =<<<SETNAV
function(numrecs) {
if (numrecs < 200000) {
$(‘#pager_excel’).hide();
} else {
$(‘#pager_excel’).show();
}
}
SETNAV;
$grid->setGridEvent(‘beforeProcessing’,$Recs);
$grid->setGridEvent(‘gridComplete’,$setNav);
$grid->setNavOptions(‘navigator’,array(‘add’=>false,’edit’=>false,’del’=>false,’view’=>true,”columns”=>true));
// Run the script
$grid->renderGrid(‘#grid’,’#pager’,true, null, null, true,true);
[/code]
Naturally it’s not working as I had hoped. If you could clue me in on the proper method I would appreciate it.
Ken
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top