This is a migrated thread and some comments may be shown as answers.

Nested Mail merge

1 Answer 67 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Xiao
Top achievements
Rank 1
Xiao asked on 09 Nov 2012, 05:52 PM
Hello Telerik team,

Is RadDocument currently supports Nested mail merge fields?

For example: 

{ IF { MERGEFIELD "First_Name" } = "John" "Is John" "Not John" }

I won't use the the data source in the RadRichTextBox to replace the merge fields in RadDocument.
Instead, I will write my own logic to replace them. So what I'm curious is that whether RadDocument can
understand nested fields.

If it is not supported, am I able to do some customization to make it work?

Thanks

1 Answer, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 12 Nov 2012, 10:08 AM
Hi Xiao,
RadRichTextBox's document model supports nested fields, however conditional fields ('IF') are not supported for now.
Keep in mind that replacing the fields directly in the document can be tricky sometimes. Instead, you could try to extend the default merge fields, as described in this forum thread. Please find attached another sample, demonstrating custom merge field which evaluates conditionally depending on a property in the data source. The demo is for Silverlight 4, but should work for Silvelright 5 as well.


Regards,
Boby
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Xiao
Top achievements
Rank 1
Answers by
Boby
Telerik team
Share this question
or