If you have used Winforms Data Grid then you know that they are useful but a big pain when it comes to printing them because that functionality is very limited. For this reason many people have written their own classes that print the data grid.
I don’t know VB.net so I am not sure of how to “create” an instance of a class to pass my datagrid for the printing to the code I listed on pastebin. I am looking to print the datagrid using the pastebin code but I don’t know of what I must write, in code, to pass my datagrid for the printing. For this example lets assume the name of a DataGrid is “dgvName”
It’s a shared method, which is the same thing as static in c#, so just pass your DataGridView you have as the parameter: