This is a migrated thread and some comments may be shown as answers.

HTML Export of td with colspan has wrong width

1 Answer 90 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Erol
Top achievements
Rank 1
Erol asked on 13 Nov 2012, 03:24 PM
Hi,

I upgraded my controls to WPF Q3 2012 (2012.3.1017.40) from 2012.1.215.40.
HtmlFormatProvider.Export is not working properly with TableCell with colspan. It was working before by not showing a width attribute in the style tag. Now it shows a width attribute, ignores manually set width and uses the width of smallest regular column.

I have tried traversing the RadDocument and setting the width manually to 530 px, it was ignored. I have also tried setting width on all table cells with colspan tag to null, it was ignored as well. 176.67px is the exact size of 1 column for me after document margins etc. Its a 4 column layout.

Below is an example of the first row in table. Previous Export is what it looked like. New Export is what it does now.

Previous Export (No Width tag in td with colspan tag)
<tr>
    <td style="border-left: 0px none #000000; border-top: 0px none #000000; border-right: 0px none #000000;
        border-bottom: 0px none #000000; padding: 5px 0px 5px 0px; vertical-align: top;"
        align="left" valign="top" colspan="3">
        Column 1-3
    </td>
    <td style="border-left: 0px none #000000; border-top: 0px none #000000; border-right: 0px none #000000;
        border-bottom: 0px none #000000; padding: 5px 0px 5px 0px; width: 176.666666666667px; vertical-align: top;"
        align="left" valign="top">
        Column 4
    </td>
</tr>

New Export (width tag in td with colspan)
<tr>
    <td style="border-left: 0px none #000000; border-top: 0px none #000000; border-right: 0px none #000000;
        border-bottom: 0px none #000000; padding: 5px 0px 5px 0px; width: 176.666666666667px;
        vertical-align: top;" align="left" valign="top" colspan="3">
        Column 1-3
    </td>
    <td style="border-left: 0px none #000000; border-top: 0px none #000000; border-right: 0px none #000000;
        border-bottom: 0px none #000000; padding: 5px 0px 5px 0px; width: 245px; vertical-align: top;"
        align="left" valign="top">
         Column 4
    </td>
</tr>

Any help is appreciated. Thanks.

Also noticed that new html export is very bulky with lots of additional styles and span tags on line breaks etc. It doesn't create any issues though.

Thanks,
Erol

1 Answer, 1 is accepted

Sort by
0
Mihail
Telerik team
answered on 16 Nov 2012, 11:26 AM
Hello Erol,

The problem has been confirmed. We will log it to our to do list and will try to fix it in some of our future releases. 

In appreciation your Telerik points have been updated.

Kind regards,
Mihail
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Erol
Top achievements
Rank 1
Answers by
Mihail
Telerik team
Share this question
or