I have a section with two sub grids. Each customer may or may not have records in one of the grids, so I need to be able to hide the sub grid if no records are returned
I believe that most appropriate way for achieving you goal is to use CRM Endpoints to get information about the number of related records and based on the result - show or hide grid.