Is it possible to set the mail merge features via the UI to add text before and text after a field if it isn't empty?
I have seen that this is possible in code behind but I can't see to find a way to do it via the RadRichTextBox UI.
Thank you for your time,
Rob
1 Answer, 1 is accepted
0
Iva Toteva
Telerik team
answered on 27 Jun 2012, 07:53 AM
Hello Rob,
The InsertMergeFieldEmptyCommand does not include TextBeforeIfNotEmpty and TextAfterIfNotEmpty for the MergeFields when inserting them. In order to achieve this behavior, you should remove the binding to the InsertMergeFieldEmptyCommand and handle the Click event of the button.
You can refer to this post which shows how the dropdown can be constructed. What you should add is setters of the properties of the merge field TextBeforeIfNotEmpty and TextAfterIfNotEmpty when setting the fieldButton.CommandParameter.
Let us know if you need further assistance.
All the best,
Iva Toteva
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>