I have a class DataModel with a name, an image and a property Children containing a list of DataModel.
In my template Word, I want to display the image of each child. I am using a mailmerge (ExecuteNestedGroup) to do that.
If the property Image of the child returns a value, the image is well displayed. But, if the child does not have an image and the property Image returns null (if it is a System.Drawing.Image) or "" (if it is a string), the field is filled with the Image of the parent.
I don't want this behaviour. If my child does not have any image, I will just display nothing. What can I do to avoid that ?
I have created a solution to help you understand the problem.
VRVijay Ramachandran Syncfusion Team November 17, 2016 03:48 PM UTC
Thank you for contacting Syncfusion support.
As per the behavior of the ExecuteNestedGroup() method, if the inner table field value is null and at the same time outer table have same field name with proper value then DocIO uses the outer table data. If it multiple nested table means this process continou untill the root table reached or untill reach the value for the field.
If your requiremnet is using inner table value only means you could specify particular table name as prefix of the Merge field in your template document as like below:
If we misunderstood any of your requirement then kindly elaborate the actual requirement with detailed description. Thereby we will analyze further on the mentioned case and will provided you appropriate solution.
Let us know if you have any concern.
Regards, Vijay R
DLDelphine LacourNovember 21, 2016 08:54 AM UTC
Thanks for the help. I used "Image:Children:assemblyImage" and it works perfectly.
SYSethumanikkam Yogendran Syncfusion Team November 21, 2016 09:23 AM UTC
Thank you for your update.
Please let us know if you need any further assistance on this. We will be happy to assist you as always.