Print ListView

albertkhor

Well-known member
Joined
Jan 12, 2006
Messages
150
Programming Experience
Beginner
can someone teach me how to print listview?
i know how to print text in richtextbox but i do not know how to print listview. My listview is bind with database (microsoft access) using OleBD.
 
Unless you actually want to create an image and print that, you do all printing using a PrintDocument object and it's up to you to draw all the strings, lines etc. yourself.
 
jmcilhinney said:
Unless you actually want to create an image and print that, you do all printing using a PrintDocument object and it's up to you to draw all the strings, lines etc. yourself.

so that mean i cannot direct paste my list view to the document and print it? i only can done this by insert lines by lines and string by string?
actually my listview is bind with database (microsoft access) which is search by user. i want my system allow user to print the data they want.
 
I repeat, you do all your printing in .NET using the PrintDocument class. It is more work for simple jobs but it is very powerful. Like so many things there is a trade-off between power and ease of use. Think about it though. What if you ListView is not large enough to display all the items? If you just print the ListView as is then you won't be printing all the data. You should just use a PrintDocument to print the data from your DataTable in whatever format you want.
 
kulrom said:
John, how DataTable is related with this probelm and listView at all?
I assume that the following means there is a DataTable involved.
albertkhor said:
My listview is bind with database (microsoft access) using OleBD.
 
Back
Top