2
Answers

Create & Print DataGrid View from onclick event?

richard smith

richard smith

11y
1.3k
1
I want to link to SQL Server and populate a datagrid view (Preferably hidden as I do not want the view shown if possible) then print the results all from the onclick event of a button on my windows form.

I know how to link to sql server no trouble.  But creating a hidden datagrid view, I would think there would be a visible.no property somewhere, but I haven't yet been able to find that.

Printing...it looks like it is possible, but I would have to have the onclick event launch a new winform with a print/printpreview enabled and launch the print from there.

Is this somewhat in the ballpark of setting it up correctly or does someone have a better idea?

Answers (2)