我正在尝试在电子邮件中发送 grdiview 的选定行和列,为此我正在使用此功能
Public Function gridhtm(ByVal gv As GridView) As String
Dim sb As StringBuilder = New StringBuilder()
Dim sw As StringWriter = New StringWriter(sb)
Dim hw As HtmlTextWriter = New HtmlTextWriter(sw)
gv.RenderControl(hw)
Return sb.ToString
End Function
为了发送电子邮件,我正在发送这样的电子邮件
email("malik.adeel@shakarganj.com.pk", "[Cheque Approval] GM Finance Reviewed (" & TreeView2.SelectedValue & ")", "<b>Please find below the details of cheques prepared in favour of different parties.</b><br>" & _
gridhtm(GridView5))
问题是,当电子邮件设置时,它会将整个网格视图发送到像这张图片一样的电子邮件
在此,有两行用复选框选中,而且我想跳过一些列,比如category
nature
我只想在电子邮件中发送选定的列。但我不知道如何管理这个,所以请给出任何想法来完成这个。