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.
![](https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=26241&image=1&table=forumtopics)
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.
- 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.
![](https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=26241&image=2&table=forumtopics)