Back
gridUserLens
Table and Grid formating
gridUserLens
Allow end-users to configure what columns to display in the grid.
Default:
When dynamic editing is disabled ($lens->dynEdit = false), the end-user is allowed to click on the green "e" icon on the grid and select grid fields to hide/display.

All fields can be manipulated by the end-user, except for field names that begin with underscore ('_') which are hidden.

Each end-user can set his or her grid fields independantly. This is determined by the gridUserLens setting:

$lens->gridUserLens = 'USERID';
$lens->dynEdit = false; # for security

The above setting means use the $GLOBALS['USERID'] variable as to identify which grid settings phplens should load. If this global variable is empty, then we assume that no end-user has logged in and do not allow any modifications.

In this example, we will store the grid selections in the phplens table, with the "id" field being set to 's_'.$GLOBALS['USERID'].

Phplens does not delete this record, so if you want to clear this field, you can do so yourself. The last modification time of each record is stored in the "lastmod" field.

Syntax
# use $USERID global variable
$lens->gridUserLens = 'USERID';

 Basic:Yes  Advanced/Enterprise:Yes  DynamicEdit:Yes   [Version 1.0]