You might test for the existence of
child data within a handler method for the GridView.MasterRowExpanding
Event. Set the Allow property of the MasterRowCanExpandEventArgs parameter
accordingly.
Not sure how you would test for the existence of
specific child data, though, when a filter is applied. Might have to parse
the filter expression, somehow, and combine it with a check on the value in the
column that is related to the master row being expanded.
Sorry I can't help further. Hope these ideas
help.