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

RadImageEditor does not accept width in percentage

1 Answer 62 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Ankit
Top achievements
Rank 1
Ankit asked on 09 Dec 2011, 04:18 PM

RadImageEditor does not accept width in percentage.

In my project I am having a rad Panel within which I have a user control which contains a RadGrid. This rad grid has a NestedViewTemplate which contains <td> <tr> formation with a single row and two <td>’s I have given 50% width to each of these <td>’s and each of these <td>’s contain another user control which contains a RadImageEditor control with width as 100%. But when I run my code the Image control goes out of its parent element. Is there a way to fix this issue?

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 15 Dec 2011, 06:16 PM
Hi Ankit,

This problem is not directly related to RadImageEditor but is due to the way HTML <table> element behaves - regardless the size set to the table if an element inside it is wider that the preset width the table will get expanded to the fit this element. You can observe this using the following simple HTML:
<table style="width: 500px; border: 5px solid red;">
    <tr style="width:500px;">
        <td style="width:500px;">
            <div style="width: 2000px; height: 10px; background-color: yellow;">
            </div>
        </td>
    </tr>
</table>

I believe that the image loaded inside RadImageEditor is the element that expands the size of the wrapping table. Could you please provide a sample code demonstrating the specific scenario so we can try to provide a suitable solution?

Regards,
Dobromir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
ImageEditor
Asked by
Ankit
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or