如何设置循环以打印所有gridview单元格

如何设置循环以打印所有gridview单元格

本文介绍了如何设置循环以打印所有gridview单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
       Dim ce = Assesment.d1.CurrentCell.RowIndex
       e.Graphics.DrawString(Assesment.d1.Item(Assesment.SLNo.HeaderText, ce).Value.ToString, SystemFonts.DefaultFont, Brushes.Black, 300, 200)

       Dim ce1 = Assesment.d1.CurrentCell.RowIndex
       e.Graphics.DrawString(Assesment.d1.Item(Assesment.JOBPARTICULARS.HeaderText, ce1).Value.ToString, SystemFonts.DefaultFont, Brushes.Black, 350, 200)
       'Dim ce2 = Assesment.d1.CurrentCell.RowIndex
       'e.Graphics.DrawString(Assesment.d1.Item(Assesment.PC.HeaderText, ce2).Value.ToString, SystemFonts.DefaultFont, Brushes.Black, 400, 200)


       'Dim ce3 = Assesment.d1.CurrentCell.RowIndex
       'e.Graphics.DrawString(Assesment.d1.Item(Assesment.AC.HeaderText, ce3).Value.ToString, SystemFonts.DefaultFont, Brushes.Black, 450, 200)
       'Dim ce4 = Assesment.d1.CurrentCell.RowIndex
       'e.Graphics.DrawString(Assesment.d1.Item(Assesment.Aa.HeaderText, ce4).Value.ToString, SystemFonts.DefaultFont, Brushes.Black, 500, 200)
   End Sub

推荐答案


这篇关于如何设置循环以打印所有gridview单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 16:51