HTML Export of td with colspan has wrong width

2 posts, 0 answers
  1. Erol
    Erol avatar
    6 posts
    Member since:
    Feb 2012

    Posted 13 Nov 2012 Link to this post

    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
  2. Mihail
    Admin
    Mihail avatar
    192 posts

    Posted 16 Nov 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top