We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Generating table rows and preserved formats

Thread ID:





101801 Nov 22,2011 01:10 PM UTC Nov 23,2011 06:15 AM UTC WinForms 1
Tags: DocIO
Christian Rattat
Asked On November 22, 2011 01:10 PM UTC


I'm tyring to create docs from a template doc where I have to fill in data into predefined tables. In the template the tables already exist and are formatted. Each of such tables has two rows, first one with captions, second one with a placeholder in the most left cell.

In my programm I scan for tables with these placeholders. Once I found one I get the row with the placeholder into a variable and remove it from the table. Then for each data to insert I add a cloned copy of the removed row as it contains the formats defined in the template. So more less like this:

if (IsTemplateTable(table))
WTableRow templateRow = table.Rows[1];
foreach (Data data in MyData)
int index = table.Rows.Add(templateRow.Clone());
table.Rows[i].Cells[0].Paragraphs[0].Text = data.ID;
table.Rows[i].Cells[1].Paragraphs[0].Text = data.Value;

Building the table works fine but it does not preserve the original formats. Instead the text in the table cells have standard format and the formats of the template doc are not there. Even if I just set Paragraph.Text of the original row in the template row to another text it has the standard format afterwards.

How can I set a new text (not replacing as most cells are just empty) to a cell while preserving or applying the original format.

Thanks in advance,

Gunasekaran T [Syncfusion]
Replied On November 23, 2011 06:15 AM UTC

Hi Christian,

Thank you for your interest in Syncfusion products.

We are not able to reproduce the mentioned issue with preservation of the formatting’s for the rows inserted to the table using DocIO. For your reference we have attached the sample used to test the mentioned issue on our side. Please do find the sample from the following location. Try the attached sample and let us know if this helps you.

Sample link:

If you are not able reproduce the mentioned issue with attached sample, please modify the sample to reproduce the issue and provide us the modified sample for further analysis.

Please let us know if you have any other questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon