个人感觉Another DataGridView Printer的DGVPrinter.cs还是很好用的.
在使用中发现了PrintRange,其功能就是打印选中的datagridview部分,而不是全部。
使用时首先声明:


1

然后


1

2

3

4



5

6



7

8



9

10



11

12

13

14

15

16

17

18

19



20

21

22

23

24

25

最后


private void btnPrint_Click(object sender, EventArgs e)
{
if (printSetting())
printer.PrintNoDisplay(MyDataGridView);
else
{
MessageBox.Show("请选择要打印的数据!");
}
}