Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hello,

                                    We are trying to build a RTF-document dynamically by having a RTF-template containing DOCVARIABLEs and MERGEFIELDs and binding it to/insert values from, a data-source. Our biggest problem is how to handle insertion of table data. If we where to use the approach in the Master-detail demo, we would need additional RTF-templates for each table, and we would like to avoid that. Is it possible to some way define the master-detail templates inside a RTF-template (and extract them in some way)?

                                    The only other solution we see is to build the tables in code-behind and insert them, the big downside being that we can't style the tables.

                                    Thanks

                                0

                                Hello Peter,

                                Generally, you should be able to define any number of master and/or detail templates within one RTF document. After that utilize the SubDocument.GetRtfText Method to extract a certain template. Note that in this scenario you need to know in which DocumentRange this template is located. I hope you will find this information helpful.

                                Thanks,
                                Alessandro.

                                0

                                Thanks for the response. We'll be looking at using SubDocument.GetRtfText to get the master and detail templates. The next problem comes with identifying the parts (documentranges) that contains a master/detail template. Is there any way to put a RTF-template in a identifiable part of the RTF document? Looking at the document model a document contains "sections" (and pages?), is it possible to insert RTF-text into a seperate part - and if so, is it possible to give this part some kind of identifier/name so it can be found?

                                0

                                Hello Peter,

                                There is no built-in method to accomplish this task. Our developers strongly recommend that you store different templates in different files. Why is not this approach appropriate for you?

                                Thanks,
                                Alessandro.

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners