RadImageEditor does not accept width in percentage

2 posts, 0 answers
  1. Ankit
    Ankit avatar
    12 posts
    Member since:
    Jul 2011

    Posted 09 Dec 2011 Link to this post

    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?

  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 15 Dec 2011 Link to this post

    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;">

    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?

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top