Printing a .NET DataGridView

后端 未结 9 778
南旧
南旧 2020-12-08 05:33

I am fairly new to .NET and C#, but I have a DataGridView that I would like to print. What would be the best way to go about doing so?

9条回答
  •  温柔的废话
    2020-12-08 06:19

    If you are going to be printing more than just DataGridViews, then a more generic approach may be worth pursuing. We use MigraDoc and then wrote our own class to read DataGridViews and output MigraDoc classes representing a table.

    There are lots of great printing packages available, but I only have experience with MigraDoc.

    Edit:

    In response to comments, here is a link to my site showing the code I created for generating MigraDoc tables and an example of using it to display a DataGridView (DataGridView to MigraDoc tables).

提交回复
热议问题