RadTextBox resizing in IE

7 posts, 0 answers
  1. Andy
    Andy avatar
    11 posts
    Member since:
    Jan 2008

    Posted 31 Mar 2009 Link to this post

    Hi,

    I'm designing a webapp using RAD AJAX controls and am trying to make use of the RadTextBox control.  The width of the website is dynamically sized with the width of the browser window.  Previously this had all been working without issue.  The textboxes had a width property set to a percentage size of the window, and when the page resized the text boxes also resized.

    Recently I've had a tidy up of some of the html in my master page and now the text boxes will no longer resize with the browser window in Internet Explorer, however they still resize corectly in all other browsers (Firefox, Chrome and Opera).  

    <

     

    div class="panel">

     

     

        <div class="titleNS">

     

     

            <div>

     

     

                Site Address

     

     

            </div>

     

     

         </div>

     

     

        <div class="titleNS">

     

     

             <div>

     

     

                <telerik:radtextbox id="txtProjectSiteName" runat="server" maxlength="50" ReadOnlyStyle-ForeColor="black" Skin="Vista"
                    width="100%"></telerik:radtextbox>

     

     

             </div>

     

     

         </div>

     

     

        <div class="cleaner"></div>
    </div>


    CSS:
    .panel

     

     

     

    {

     

    padding:5px 5px 5px 5px;

     

    border-width:1px;

     

    border-style:solid;

     

    border-color:#999999;

     

    background-color:#ffffff;

    }

    .titleNS

     

     

     

    {
    font-weight:bold;
    text-align:right;
    float:left;
    width:33%;
    }

     

    .titleNS div {
    padding: 0px 5px 5px 0px
    }

     

     

     

     

     

     

     

     

     

  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 31 Mar 2009 Link to this post

    Hi Marc,

    You have several options:

    1) use a RadSplitter based layout. The RadTextBoxes, which are placed inside RadSplitter, resize automatically, if their width is set in percent.

    2) Subscribe to the window.onresize event and call the repaint() method to all RadTextBoxes, that you want to resize automatically.

    3) Set ShouldResetWidthInPixels="False" (this property will be available in Q1 2009 SP1)


    Best wishes,
    Dimo
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andy
    Andy avatar
    11 posts
    Member since:
    Jan 2008

    Posted 01 Apr 2009 Link to this post

    I'm confused as my previous version of this web application had your textboxes resizing correctly and all other browsers still do resize them correctly, is there any reason why it would have now stopped working?  Has something changed in a newer release of the controls?

    Additionally if there is nothing else I can do, when will the Q1 2009 SP1 release be made available?
  5. Andy
    Andy avatar
    11 posts
    Member since:
    Jan 2008

    Posted 01 Apr 2009 Link to this post

    Further investigation leads me to believe that this is a bug with new versions of the telerik.web.ui control and nothing to do with the changes I have made to my master template.  I reverted my control version back to version 2008.2.1001.20 from version 2008.3.1314.20 and my radtextboxes once again resize correctly.
  6. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 01 Apr 2009 Link to this post

    Hi Marc,

    The resizing functionality was disabled for Internet Explorer due to a specific bugfix related to unexpected textbox expanding. Resizing will be reenabled (but not by default) for Q1 2009 SP1.

    Sincerely yours,
    Dimo
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  7. ColinBowern
    ColinBowern avatar
    51 posts
    Member since:
    Aug 2012

    Posted 15 Jun 2009 Link to this post

    I tried both 2 and 3 and it isn't working.

            <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
     
                <script type="text/javascript"
                    $(window).bind('resize', function() { 
                    var searchInput = (document.all ? document.all["<%= SearchCriteria.ClientID %>"] : document.getElementById("<%= SearchCriteria.ClientID %>")) 
                        searchInput.repaint(); 
                    }); 
                </script> 
     
            </telerik:RadCodeBlock> 
     


    Any thoughts?
  8. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 17 Jun 2009 Link to this post

    Hi Colin,

    The repaint() method should be called to the RadInput client object, not its DOM element. Use $find() :

    var searchInput = $find("<%= SearchCriteria.ClientID %>");

    http://www.telerik.com/help/aspnet-ajax/input_clientsidebasics.html

    Greetings,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017