这是我的gridView
这是我的将gridview导出到Outlook的代码
Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.MailItem oMsg = (Microsoft.Office.Interop.Outlook.MailItem)oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
string str;
MemoryStream ms = new MemoryStream();
try
{
gridView2.ExportToHtml(ms);
ms.Seek(0, SeekOrigin.Begin);
StreamReader sr = new StreamReader(ms);
str = sr.ReadToEnd();
}
finally
{
ms.Close();
}
oMsg.To = "test@test.com";
oMsg.Subject = "Test: ";
oMsg.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML;
oMsg.Display(false);
oMsg.HTMLBody = "Test" + str + oMsg.HTMLBody;
图标内置在gridview中
我怎么解决这个问题?
谢谢。
更新:我已经在Designer中使用ColumnView.FormatRules属性添加了IconSet
ColumnView.FormatRules