HideAllRows Hides Grid on a Page

No votes yet

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*/
   &RS1.HideAllRows();
Else
   /*Show the grid*/
   &RS1.ShowAllRows();
End-If;

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!

Comments

Have a question? Please ask it on the forum instead.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.