When I add the above code and in the datagridview1 I select e.g. 10 lines from column 1 and click the print button, the print preview opens and says "Document does not contain any pages"