The reason why the 'printpreviewdialog1' shows up is because it is the named control derived from the actual control 'printpreviewdialog' Class - see full explanation and sample code -
MS Learn | PrintPreviewDialog Class
[
^]
The object will be declared as such -
internal PrintPreviewDialog PrintPreviewDialog1;
The 'PrintPreviewDialog.ShowDialog()' method displays the print preview dialog as a modal dialog box. When you call 'ShowDialog()', it will block the execution of code until the dialog is closed by the user.
The 'PrintPreviewDialog.Show()' method displays the print preview dialog as a non-modal dialog box. When you call 'Show()', it will not block the execution of code, and your app continues to run while the print preview is open meaning that the code after the 'Show()' method will continue to execute without waiting for the user to close the preview.
When your 'PrintPreviewDialog.Show()' metod is showing an empty preview, it's possible that the code following the 'Show()' method might be modifying or refreshing the content of the print preview, causing it to appear empty.
Use the link above to use the proper methods and you should be fine.
Referring to the 'DataGridViewPrinter' Class, it seems you are making use of a created control done by one of our members Salan Alani. Read through his documentation properly as I think his methods might differ from what you are trying to do using a DataGrid -
CodeProject Articles | The DataGridViewPrinter Class[
^]