In the given example, user wants to hide and unhide the grid from the page by selecting the check box option on the page. If the check box is checked the grid should be visible else hide the grid & delete the values present in the grid.The check box is at level 0 & the grid is at level 1.

Function HideAllRows() can be used to hide the grid, & function ShowAllRows() can be used to unhide the grid.

HideAllRows hides all rows of the rowset.
For the given example, write the below people code at field change of check box.