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

RadTextBox resizing in IE

6 Answers 259 Views
Input
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 31 Mar 2009, 03:56 PM
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
}

 

 

 

 

 

 

 

 

 

6 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 31 Mar 2009, 04:45 PM
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.
0
Andy
Top achievements
Rank 1
answered on 01 Apr 2009, 07:40 AM
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?
0
Andy
Top achievements
Rank 1
answered on 01 Apr 2009, 09:03 AM
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.
0
Dimo
Telerik team
answered on 01 Apr 2009, 09:34 AM
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.
0
ColinBowern
Top achievements
Rank 1
answered on 16 Jun 2009, 03:28 AM
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?
0
Dimo
Telerik team
answered on 17 Jun 2009, 11:07 AM
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.
Tags
Input
Asked by
Andy
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Andy
Top achievements
Rank 1
ColinBowern
Top achievements
Rank 1
Share this question
or