Hello,
probably this will be a really simple and stupid question but nevertheless, I am stuck.
This is what I tried to do: We store rtf in a database and are planning to use Telerik controls in the future (there is a lot of impressive software inside).
Importing the rtf-text to RichTextEditor is quite easy. I simply put the content of the database field into a string variable and import it into RichtextEditore with this code:
Private
Sub
ImportRtf()
Dim
provider
As
New
RtfFormatProvider()
content =
CStr
(DataGridView.CurrentRow.Cells(xx).Value)
Me
.RadRichTextEditor1.Document = provider.Import(content)
End
Sub
This works perfectly.
After editing the text in RichTextEditor I need to export the new text as rtf to a string to store it in the database. I looked over the documentation and found this:
Public
Function
ExportToRtf(
ByVal
document
As
RadDocument)
As
String
Dim
provider
As
New
RtfFormatProvider()
Return
provider.Export(document)
End
Function
I tried to assign the function's return value to an another string variable:
Private
Sub
Button1_Click(sender
As
Object
, e
As
EventArgs)
Handles
Button1.Click
Dim
content1
As
String
= ExportToRtf()
MsgBox(content1)
End
Sub
VisualStudio puts a wiggled blue line under ExportToRtf() and demanded a missing argument for the functions's parameter "document".
Please tell me where my fault is.
Thanks in advance.
P. Arnold