how to print gridview data

Hi.... In my web page two grid are there one is parent grid and one is child grid. If i select parent grid any row means in the child grid the related data is showing. I want to print the data.means first the parent selected grid data and then child grid all data,how to do it please help me out