You are not logged in.
This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.
Hi
i need to send the content of grid by email.
it works fine, but i must to save to disk then load from disk
is possible to get a string with html directly from grid?
Dim fsHTML As New System.IO.FileStream("c:\sample.html", System.IO.FileMode.Create, System.IO.FileAccess.Write)
Grd.ExportAsHTML(fsHTML)
Dim sReader As New System.IO.StreamReader("c:\sample.html")
'Read the entire text, and set it to a string
Dim strFileContents As String = sReader.ReadToEnd()
'send email
Dim eMail As New eMail
eMail.IsBodyHtml = True
eMail.SendMail("[email protected]", "", "", "subject: html test", strFileContents, New List(Of eAttachment), False)
thanks
Offline
It can work with stream so output the html into memory stream, then convert it to string:
Dim ms As New System.IO.MemoryStream()
grid.ExportAsHTML(ms)
Dim htmlstr As String = System.Text.Encoding.Default.GetString(ms.GetBuffer)
'do something
Last edited by Jingwood (2014-07-24 05:22:59)
Offline