This topic is locked

How to hide empty columns on the List page

2/19/2019 1:20:15 PM
PHPRunner Tips and Tricks
admin

Lets say you have a List page with a large number of columns but some of them have no values in it. You may want to hide them to save some screen space.
Take a look at HomePage column on this screenshot.


Only first record has an URL in this field. If we remove this URL there is no need to display this column at all. Here is hide we can hide this column automatically.

  1. BeforeProcess event of that list page

$_SESSION["showHomePage"]=false;


2. Set 'View as' type of HomePage column to Custom and use the following code there:

if ($value!="")

$_SESSION["showHomePage"]=true;


3. BeforeDisplay event of that list page:

if (!$_SESSION["showHomePage"])

$pageObject->hideField("HomePage");


So if we edit first record and remove URL from there this is what we going to get.

H
htmalbenur 2/19/2019

hi mr ADM and if i want to do the opposite, i want to keep only the fill spaces and eliminate the other colones and missing lines?
thank you

P
Philip 3/11/2019

COOL !

Is this possible as well for a column with checkbox?