I believe the problem you're having is with where you set the visibility and toggle properties. Instead of setting the properties on the row or cell you want to show/hide, you need to set the properties on the group that contains the row or cell. This should get rid of the extra white space.