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. Image for the cookie policy date

Border set on row in table not shown + image in cell not shown

Hello,

While using DocIO for WPF, I've encountered two issues. 

Applying a border to a table row doesn't seem to work. Applying it to the table, or cells within rows, seems to work just fine. 

Inserting an image into the paragraph of a cell of a table doesn't seem to work either.

Please find a sample project attached in which the two problem should be easily reproduced.

I would kindly like to request some feedback on these issues.

Kind regards,

Floris

Attachment: WordTestApp_af74463d.zip

6 Replies

PR Poorani Rajendran Syncfusion Team September 5, 2019 06:00 PM UTC

Hi Floris,

Thank you for contacting Syncfusion support.

Regarding Inserting an image into the paragraph of a cell of a table doesn't seem to work:
On analyzing the given sample application, we have found that while inserting an image in the paragraph and setting some text to that same paragraph in Paragraph.Text API means, it will removes all other entity and it will add new text as text range in that paragraph. So the image is removed in the paragraph and causes the reported issue.

We have modified given sample application and it can be downloaded from the below link:
https://www.syncfusion.com/downloads/support/directtrac/147289/ze/WordTestApp712212221

Please use below highlighted code snippet in your sample.

 
case string text:
    cellText = text;
    paragraph.Text = cellText;
    break;
 

Regarding Applying a border to a table row doesn't seem to work:
We will validate on your reported problem and update you more details on 9th September 2019.

Please let us know if you have any other questions.

Regards,
Poorani Rajendran
 



FV Floris Verhoeven September 5, 2019 06:30 PM UTC

Hello Poorani,

This indeed solved the image inserting issue. Thanks for the fix.

Looking forward to hearing about the row border issue.

Thanks for your assistance.

Kind regards,

Floris


PR Poorani Rajendran Syncfusion Team September 6, 2019 04:53 AM UTC

Hi Floris,

Thank you for your update.

Regarding solved the image inserting issue:

We are glad to know that our solution has resolved your requirement.

Regarding row border issue:
As mentioned in our previous update (
Updated on 9/5/2019),We can reproduce the reported “Border is not applied for the row of table in Word document” from our side. We will validate on this issue and update you the further details on 9th September, 2019.

Regards,
Poorani Rajendran



PR Poorani Rajendran Syncfusion Team September 9, 2019 01:35 PM UTC

Hi Floris,

Thank you for your patience.

Regarding row border issue:
On analyzing in depth on reported row border issue,
we have exposed RowFormat.Borders API to apply the border for row which is applicable only for 2003 DOC format alone.

In latest version of Microsoft Word application, it applies border for text, paragraph, table and cell alone border can’t be applied for row of the table and it can be shown in below screenshot,



To resolve this issue, we suggest you apply the border for each cell in the corresponding row using CellFormat.Borders API. We have modified the given sample application and it can be downloaded from the below link:
https://www.syncfusion.com/downloads/support/forum/147289/ze/WordTestApp1154210894

Please use below highlighted code snippet in your sample.

 
for (var cellIndex = 0; cellIndex < data.Length; cellIndex++)
{
 
var cellContent = data[cellIndex];
 
var cell = row.Cells[cellIndex];
 
//Applies border for each cell
  cell.CellFormat.Borders.Bottom.BorderType = BorderStyle.Thick; 

Note: We will consider this scenario and will update this limitation in our UG documentation.

Please let us know if you have any other questions.

Regards,
Poorani Rajendran
 



FV Floris Verhoeven September 11, 2019 10:35 AM UTC

Hello,

Thanks for the detailed answer. I understand now why it doesn't work. It would indeed be great if you could update your documentation.

Thanks for your assistance.

Kind regards,

Floris


PR Poorani Rajendran Syncfusion Team September 12, 2019 07:03 PM UTC

Hi Floris,

Thank you for your valuable feedback. We have updated the details in our documentation, it some more time to reflect in live site.

Regards,
Poorani Rajendran


Loader.
Live Chat Icon For mobile
Up arrow icon