Christian Porath ← Feedback & Support for phpGrid My feedback 2 results found save position of columns 1 vote Vote Vote Vote Vote We're glad you're herePlease sign in to leave feedback Signed in as (Sign out) Close Close 1 vote 2 votes 3 votes Remove votes You have left! (?) (thinking…) 0 comments · General · Edit… · Delete… · Admin → How important is this to you? Not at all You must login first! Important You must login first! Critical You must login first! We're glad you're herePlease sign in to leave feedback Signed in as (Sign out) Close Close Christian Porath shared this idea · Jul 14, 2017 Page-Reload-Persistent Search 40 votes Vote Vote Vote Vote We're glad you're herePlease sign in to leave feedback Signed in as (Sign out) Close Close 1 vote 2 votes 3 votes Remove votes You have left! (?) (thinking…) 4 comments · General · Delete… · Admin → How important is this to you? Not at all You must login first! Important You must login first! Critical You must login first! We're glad you're herePlease sign in to leave feedback Signed in as (Sign out) Close Close An error occurred while saving the comment Christian Porath commented · Jul 7, 2017 · Edit… · Delete… I found a way to solve this using a session variable, but only for sortings and pagesize settings. first step: include in <phpgrid_dir>/data.php on row 33 $getGridSettings=array('rows','sidx','sord'); foreach($getGridSettings as $setItem) if(isset($_GET[$setItem]) && $_GET[$setItem]) $_SESSION['grid'][$setItem]=$_GET[$setItem]; second step: use this in your object methods like $defaultPageSize=500; // value for default if(isset($_SESSION['grid']['sidx']) && isset($_SESSION['grid']['sord'])) $dg->set_sortname($_SESSION['grid']['sidx'],strtoupper($_SESSION['grid']['sord'])); if(isset($_SESSION['grid']['rows'])) $dg->set_pagesize($_SESSION['grid']['rows']); else $dg->set_pagesize($defaultPageSize); Save Submitting...
I found a way to solve this using a session variable, but only for sortings and pagesize settings.
first step: include in <phpgrid_dir>/data.php on row 33
$getGridSettings=array('rows','sidx','sord');
foreach($getGridSettings as $setItem)
if(isset($_GET[$setItem]) && $_GET[$setItem])
$_SESSION['grid'][$setItem]=$_GET[$setItem];
second step: use this in your object methods like
$defaultPageSize=500; // value for default
if(isset($_SESSION['grid']['sidx']) && isset($_SESSION['grid']['sord']))
$dg->set_sortname($_SESSION['grid']['sidx'],strtoupper($_SESSION['grid']['sord']));
if(isset($_SESSION['grid']['rows']))
$dg->set_pagesize($_SESSION['grid']['rows']);
else
$dg->set_pagesize($defaultPageSize);