Skip to content

Christian Porath

My feedback

2 results found

  1. 1 vote
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  General  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Christian Porath shared this idea  · 
  2. 40 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  General  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Christian Porath commented  · 

    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);

Feedback and Knowledge Base