This is a migrated thread and some comments may be shown as answers.
Numeric TextBox cursor position
6 Answers 92 Views
This is a migrated thread and some comments may be shown as answers.
joshua odell
Top achievements
Rank 1
joshua odell asked on 14 Jan 2009, 04:28 AM
I'm using the RadNumericUpDown in an application that requires several numeric inputs, about 20 on a single screen.
I like the UpDown ability (being able to click an arrow up and down), however I also need the user to be able to just enter in some numbers.  Well I've run into an issue, and I'm wondring if it's expected behavior or a bug.

if I highlight the text in the RadNumericUpDown box, and begin to type, lets say I type "200".  The first number gets intered ("2") but after that the cursor moves the the very far left, and the next number ("0") is entered to the left.  So what actually appears in the box is "002".  It appears to me as though you have to think in reverse to enter a number.  this seems counter intuitive.  Is this normal behavior or am i just missing a setting.  Here's the code I'm using

        <Style x:Key="Numbers" TargetType="{x:Type Tel:RadNumericUpDown}"
            <Setter Property="Width" Value="100"/> 
            <Setter Property="Margin" Value="10"/> 
            <Setter Property="Minimum" Value="0"/> 
            <Setter Property="FontSize" Value="12"/> 
        </Style> 
 
                    <Tel:RadNumericUpDown Grid.Row="0" Grid.Column="1" Style="{StaticResource Numbers}" 
                                      ValueFormat="Numeric" IsEditable="True"  
                                      Minimum="0" Maximum="100000"  
                                      Value="{Binding Path=MaxPumpOutRate.DisplayValue}"></Tel:RadNumericUpDown> 
 
 

in this example "MaxPumpOutRate" is my model object, and it has a property of type double named "DisplayValue"

Thanks for any help

6 Answers, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 15 Jan 2009, 10:56 AM
Hi Joshua ,

 Thank you for your report!

 We have to admit this is indeed a bug which have introduced recently. We will fix it in the next official release (Q1 2009). Please excuse us for the temporary inconvenience.

I have updated your Telerik points for your report.

Greetings,
Boyan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ivan
Top achievements
Rank 1
answered on 23 Jan 2009, 06:39 PM
Hi !
I think i am having the same issue here . But instead of the cursor moving after introducing the first number, it moves after introducing three numbers .. Is this normal , or should I check some property in order to the cursor mantain its position ?

Thanks,
Ivan Frias
0
Hristo Borisov
Telerik team
answered on 24 Jan 2009, 11:49 AM
Hello Ivan,

Unfortunately there is no property for configuring the cursor position. We are working closely with our UX team to introduce the best behavior in our future release. Sorry for the inconvenience and feel free to share any recommendations and suggestions in future.

Kind regards,
Hristo Borisov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dante
Top achievements
Rank 1
answered on 27 Jun 2017, 06:38 PM

Hi.

I wanna know if already exit a property for configuring the cursor position ?

Greetings.

0
Dante
Top achievements
Rank 1
answered on 27 Jun 2017, 06:47 PM
Hi.
I wanna know if already exit a solution for configuring the cursor position ? becasuse if  I introduce phone number, it moves after at the half of texbox.
Greetings.
0
Dinko
Telerik team
answered on 30 Jun 2017, 08:54 AM
Hi Dante,

RadNumericUpDown control doesn't have build property which you can use to change the position of the cursor. An approach which you can use to achieve such behavior is to get the TextBox from the RadNumericUpDown control using the ChildrenOfType<T>() extension. Then you can set the CaretIndex text property. Check the following code snippet.
var txtBox = numericUpDownControl.ChildrenOfType<TextBox>().FirstOrDefault(x => x.Name == "textbox");
txtBox.CaretIndex = 4;

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Asked by
joshua odell
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Ivan
Top achievements
Rank 1
Hristo Borisov
Telerik team
Dante
Top achievements
Rank 1
Dinko
Telerik team
Share this question
or