how to get datagridview on tabpage dynamically

Hello all,

hope someone can assist me with my problem.
I have a tabcontrol with some tabpages. Not all have a datagridview on it. At the button of the form is a toolstripstatuslabel.
What I want to do now is, when I switch the tabpage –> check if there is a datagridview –> count the lines from it and display the result in the toostripstatuslabel.
At the moment I have a “SelectedIndexChanged” for the tabcontrol which clears the toolstripstatuslabel. But this is not so nice because if I switch the pages, I have to run my queries again to get my results back in the toolstripstatuslabel.
My problem is now how can I check if a datagridview is present or not?