RadNumericTextBox horizontal-align issue in IE.

5 posts, 0 answers
  1. Yoongu
    Yoongu avatar
    16 posts
    Member since:
    Sep 2014

    Posted 17 Nov 2014 Link to this post

    Hi,

    I have been using IE 10.0.9200.17148.
    The horizontal alignment problem occurs in IE while using RadNumericTextBox.
    (In Chrome it works fine.)

    I've created a script as follows.

    aspx
    <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Height="100%" Width="100%" HorizontalAlign="NotSet" LoadingPanelID="baseLoadingPanel" OnAjaxRequest="RadAjaxPanel2_AjaxRequest">
        <asp:FormView ID="detailsView" runat="server" OnDataBound="detailsView_DataBound">
             <telerik:RadNumericTextBox ID="sphR" runat="server" Width="100%" DbValue='<%# Eval("sphR") %>' Number="0" ReadOnly="True">
             </telerik:RadNumericTextBox>
        </asp:FormView>
    </telerik:RadAjaxPanel>

    cs
    protected void detailsView_DataBound(object sender, EventArgs e)
    {
        FormView item = (FormView)sender;
     
        RadNumericTextBox c = ((RadNumericTextBox)item.FindControl("sphR"));
        c.Style.Add("text-align", "right");
        c.EnabledStyle.HorizontalAlign = HorizontalAlign.Right;
     }

    It works when the first page is open, but it doesn't work with later DataBind.
    Please detail symptoms with reference to the attached avi file.
    (Here is not able to attach a zip file, it has changed the extension to gif.)

    Thanks,
    Yoongu
  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 20 Nov 2014 Link to this post

    Hi Yoongu,

    I am afraid that the video you attached as a gif file does not run on my end. Moreover, the markup shown in the post is not valid. Nesting another control directly in the FormView control would produce an error.

    With this said, I tried to replicate the behavior you describe, however it was not observed on my end. I am attaching a sample project I used for testing. Give it a try and let me know how it works on your end. I would appreciate it if you could describe what needs to be changed in order to replicate the problematic behavior.

    Regards,
    Viktor Tachev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Yoongu
    Yoongu avatar
    16 posts
    Member since:
    Sep 2014

    Posted 20 Nov 2014 in reply to Viktor Tachev Link to this post

    Thank you for your reply Viktor.

    I will create a new solution, was test your source.
    However, this is still the same symptoms.

    When the page is first opened, the text is aligned to the left, and the focus will be aligned then go right.
    I want to be always horizontal text alignment to the right.

    I will attach the execution results in the video.
    Please to clear the .png run behind the file name.

    The real file name is test.avi

  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 25 Nov 2014 Link to this post

    Hi Yoongu,

    If you would like to align the contents in the RadNumericTextBox you should use CSS. You can set the CssClass property for the control in the markup, or in the code-behind. Then you can use that class to define the look that is required.

    For your convenience I am attaching the sample project where the approach is implemented.

    Regards,
    Viktor Tachev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Yoongu
    Yoongu avatar
    16 posts
    Member since:
    Sep 2014

    Posted 03 Dec 2014 Link to this post

    This works very well for me.

    Thank you!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017