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

Ajaxified element gains adjacent blank space before first postback

2 Answers 28 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Rodrigo Selada
Top achievements
Rank 1
Rodrigo Selada asked on 23 Sep 2009, 06:04 PM

Hi!

I've noticed that when I have an ajaxified ASP.Net TextBox next to some characters, the Textbox will insert a space before the adjacent characters. Right after the first ajaxified postback, the space disappears. This makes my UI to move a space to the side when the user provokes the first partial postback.

Code example here:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="Button1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="txtRecord" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
 
    <asp:Button ID="Button1" runat="server" Text="Button" /> 
    <asp:TextBox ID="txtRecord" runat="server" Width="22px" Text="0" />| 
    <%-- !!! Atention to the vertical bar right after the textbox! !!!--%> 

How can I make the space introduced by the rendered div panel of the ajaxification disappear?


Regards,

Rodrigo S.

2 Answers, 1 is accepted

Sort by
0
Rodrigo Selada
Top achievements
Rank 1
answered on 28 Sep 2009, 02:16 PM
Has anyone lived this issue and can anyone give me a clue?
0
Pavlina
Telerik team
answered on 28 Sep 2009, 03:02 PM
Hello Rodrigo,

In order to achieve the desired functionality, please examine the code snippet bellow and let me know if it helps.
ASPX:
   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Button1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="txtRecord" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <asp:Button ID="Button1" runat="server" Text="Button" /> 
        <div class="myContainer" style="width: 200px">  
            <asp:TextBox ID="txtRecord" runat="server" Width="22px" Text="0" /> 
            <span class="otherContent">|</span> 
        </div> 

CSS:
   <style type="text/css">  
        .myContainer > div, .myContainer .otherContent  
        {  
            floatleft;  
        }  
    </style> 

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
Rodrigo Selada
Top achievements
Rank 1
Answers by
Rodrigo Selada
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or