4. Iterate through each row of the DataGrid and use the Printer object to print the contents.