This is a migrated thread and some comments may be shown as answers.
Dynamic Mailmerge?
8 Answers 91 Views
This is a migrated thread and some comments may be shown as answers.
Filips
Top achievements
Rank 2
Filips asked on 19 Nov 2011, 05:31 PM
Is there a way to bind DynamicObject property bag to MailMerge.ItemSource? 
For me, it fetches the property names correctly, but fails to get the content of it.
Tried with ExpadoObject and Dictionary. 

8 Answers, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 24 Nov 2011, 03:39 PM
Hi Filips,
We didn't manage to reproduce the problem. Please find attached a working demo that uses a list of ExpandoObject-s as data source for the mail merge operation.
Could you please share some more details about your scenario or send us (through a support ticket) a sample project that reproduces the exception?

Best wishes,
Boby
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Andrew
Top achievements
Rank 1
answered on 28 Feb 2012, 05:06 AM
I've tried your example but when I try and preview the data nothing shows up.
0
Iva Toteva
Telerik team
answered on 01 Mar 2012, 11:41 AM
Hi Andrew,

Thank you for bringing this issue up. There is indeed a problem with ExpandoObject in Silverlight. The strange thing is that the same code works for the WPF version of RadRichTextBox and the two controls share a common code base. Boby seems to have tested it in WPF, therefore was not able to reproduce the problem.
We have logged this issue, but it is not clear if it will be addressed for the 2012 Q1 SP1. 
In the meantime, the only option would be to use a MailMergeDataSource with non-dynamic objects as ItemsSource.

All the best,
Iva Toteva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Tim
Top achievements
Rank 1
answered on 25 May 2012, 09:55 PM
Hi, 

Have this issue been fixed? We had the same problem here when we tried to bind the Dynamic Object to the silverlight RichTextBox MailMergeDataSource.

Thanks,

- Ken
0
Boby
Telerik team
answered on 30 May 2012, 02:11 PM
Hi Tim,
The problem was resolved; the fix is included in Latest Internal Build (downloadable from your account), and will be part of the next official release - Q2 2012, expected in June.
Note that with dynamic objects you will be able to use only simple (single) property paths (e.g. 'PropertyName' and not 'PropertyName.OtherPropertyName').

Regards,
Boby
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Ken
Top achievements
Rank 1
answered on 31 May 2012, 01:42 AM
Hi, Boby,

I have downloaded the latest internal build and tested it. It seemed like there's a problem with the scroll bar in the radrichtextbox.
 
It works fine if the RadRichTextBox has no scroll bar in it. But if there is a scroll bar, the buttons only work for the text NOT in the veiw area.

Please check it out and please let me know if you want me to submit a sample project.

Thanks,

- Ken
0
Ken
Top achievements
Rank 1
answered on 01 Jun 2012, 01:41 AM
Hi, Boby,

After more testing, it looks like the issue may have nothing to do with the scroll bar. It's just not working consistently.

When I test the 'preview result' using a small document with 3 or 4 merge fields, it works fine. But if I use a large document with lots of merge fields, only the last several merge fields are replaced with the actual values.

I have also unbind the command binding of the button and do it in code behind but that didn't work at all.

Do you have a sample project to show me how to work with ExpandoObject in Silverlight in this latest build?

Thanks,

- Ken
0
Boby
Telerik team
answered on 04 Jun 2012, 07:37 AM
Hello Ken,
We were not able to reproduce the problem you described - we performed a test by setting a data source to an enumerable containing an ExpandoObjects and inserted some merge fields randomly in large document:
dynamic expando = new ExpandoObject();
for (int i = 0; i < 10; i++)
{
    ((IDictionary<string, Object>)expando).Add("Prop" + i.ToString(), "propvalue" + i.ToString());
}
 
document.MailMergeDataSource.ItemsSource = Enumerable.Repeat(expando, 1);
Do you have any additional code that modifies the document in your project? If so, you can try to isolate the problem in sample project and send it to us attached to a support ticket, so that we can investigate the issue further.

All the best,
Boby
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Asked by
Filips
Top achievements
Rank 2
Answers by
Boby
Telerik team
Andrew
Top achievements
Rank 1
Iva Toteva
Telerik team
Tim
Top achievements
Rank 1
Ken
Top achievements
Rank 1
Share this question
or