November 26th, 2010, 10:35 PM
print a Listview
Hello, I have a listview on a form, and I would like to print its content without saving it to file.
How can I embed it into a printpreviewcontrol before printing ?
November 27th, 2010, 08:54 PM
Re: print a Listview
In Vb what I do is use the same sql and reader code that populates the listview and use it to send data to Graphics.Drawstring instead. I would hope that approach is applicable to C#. Haven't tried that yet. My C# hasn't caught up to my VB but I'm hoping this approach will be the same. So take a look into adding a PrintDocument and a PrintPreviewDialog into the form and investigage on how to use the tandem.
Click Here to Expand Forum to Full Width