HideAllRows Hides Grid on a Page

Your rating: None Average: 1.5 (2 votes)

I have been used to turn to HideScroll and UnHideScroll functions to hide/unhide grid on a page. These two functions however, remain for backward compatibility only.

The functions have been replaced by HideAllRows and ShowAllRows methods. The methods are equivalent to a loop setting the visible propertly of each row of the rowset to false.
For the code to work though, you need to place your peoplecode in a parent rowset and execute it against a child rowset.

Here is an example where I would like to hide the grid at level 1 if some condition returns True. I placed the code behind the page so it will fire every time the page loads and it is going to be on level0 so that I can execute the code against the child rowset which is at level 1 in this example.

Local Rowset &RS1;
&RS1 = GetLevel0()(1).GetRowset(Scroll.record_name);
If (your_condition) Then
   /*Hide the grid*/
   /*Show the grid*/

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!