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

RadNumericTextBox horizontal-align issue in IE.

4 Answers 150 Views
Input
This is a migrated thread and some comments may be shown as answers.
Yoongu
Top achievements
Rank 1
Yoongu asked on 17 Nov 2014, 10:33 AM
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

4 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 20 Nov 2014, 09:58 AM
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.

 
0
Yoongu
Top achievements
Rank 1
answered on 21 Nov 2014, 02:19 AM
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

0
Viktor Tachev
Telerik team
answered on 25 Nov 2014, 01:37 PM
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.

 
0
Yoongu
Top achievements
Rank 1
answered on 03 Dec 2014, 06:18 AM
This works very well for me.

Thank you!
Tags
Input
Asked by
Yoongu
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Yoongu
Top achievements
Rank 1
Share this question
or