Printing a .NET DataGridView

后端 未结 9 815
南旧
南旧 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:07

    .NET WinForm controls (like the datagridview) do not natively support being printed.

    In the case of the datagridview, though, you can call 'DrawToBitmap', and then take that bitmap and pass it on to the printing functions in order to produce it on paper.

提交回复
热议问题