Telerik Forums
UI for WPF Forum
2 answers
18 views

i am trying to custom style RadNumericUpDown control but every time i try to click right and edit control i am losing focus

tried to find the template in documentation to copy , paste and then edit, however i couldn't

can you help with this please?

 

Best

Wael
Top achievements
Rank 1
Iron
 answered on 27 Nov 2023
1 answer
23 views

Dear Telerik Team,

I am using the RadNumericUpDown control for accepting the numeric value. I have made hidden the up and down tick button so it look like simple textbox. The purpose of using this control specific for Distance and Weight values so it can be in any unit of measurement. For example, meter, millimeter, feet, kg, ton etc.

For simple UOM like meter, I can simply set the CustomUnit as "m" and it works fine. But How can I represent the value of 99.11 feet to feet and inch e.g., 99 ft 1 in

So whenever user trying to edit the value, it will be in feet only and once it is edited value will be displayed in feet and inch. 

How can  I achieve this behavior using RadNumericUpDown control ?

Thanks & Regards,

Hiren Lad

Dinko
Telerik team
 answered on 01 Nov 2023
1 answer
47 views

Hello,

I'm using several RadNumericUpDown controls and when the language/region is set to English, as expected they show numbers with dots as decimal separators, which is fine. But when I set any European language/region they still show dots rather than commas. How can I fix this issue?

My code is like the snippet below:

                                       <telerik:RadNumericUpDown Value="{Binding ScaleMin}" HorizontalAlignment="Stretch" Width="120" Margin="5"
                                                              VerticalAlignment="Center" SmallChange="0.1" ValueFormat="Numeric" IsEnabled="{Binding IsAvailable}">
                                        <telerik:RadNumericUpDown.NumberFormatInfo>
                                            <global:NumberFormatInfo NumberGroupSeparator="" NumberDecimalDigits="1"/>
                                        </telerik:RadNumericUpDown.NumberFormatInfo>
                                        <telerik:RadNumericUpDown.Resources>
                                            <Style TargetType="{x:Type TextBox}">
                                                <Setter Property="MaxLength" Value="8"/>
                                            </Style>
                                        </telerik:RadNumericUpDown.Resources>
                                    </telerik:RadNumericUpDown>

Thanks,

G.

Stenly
Telerik team
 answered on 20 Sep 2023
0 answers
92 views

Hello,

I have a NumericUpDown with the following configuration:

1. NumberDecimalDigits=3

2. Binding to Double property in ViewModel

3. Validation (IDataErrorInfo) between 20-3000.

4. Small change 0.001

5. Big change 0.1

When I write 123.1234, I can see 123.123 in the UI but in the view model, you don't remove the additional digits.

I have the following problems:

1. Sometimes when using arrows up/down or page up/down, the 4 digit is removed. I expected that the snall/large change takes effect without removing any digits because the NumberDecimalDigits shall affect the UI.

2. On grouping/filtering, I want to apply the logic on the UI value instead of the binding value.

For 1234.1234 and 1234.1235 will be created two different groups.

In case that I have a double with 4 digits, but in the UI is configured to N3, I don't want to see two groups with same value in the Header Text. The user will not understand why there are two groups.

How can I configure the RadNumericUpDown to show 3 digits but if there is an error and the number has 4 digits to show 4 digits? (with this solution the user will understand why there is an error if he types 19.9996.

For this value, it will be round 20.000 and mark as error when minimim value 20 is allowed. Showing 4 digits will solve it.

How can I configure the Grouping and Filtering of the RadGridView to consider some double value as N3?

alex
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 16 Sep 2023
1 answer
25 views
I have a RadContextMenu (for an object on a canvas).  It works well. 
I added a NumericUpDown Control to it. 
When I open the menu, If I click the + or - button on the control first, it works fine.   
But if I click directly in the edit box of the control just after opening the menu, then the menu immediately closes.

If I open the menu, first click either the + or - and THEN click inside the edit control, then the menu stays open.

Is there a setting I can change to prevent the menu from immediately closing?

I have attached a small sample that illustrates the issue.  Run the app, right click on the shape and then immediately left click on the text-box portion of the Numeric Up Down.  The Menu will close.  But click on the +/- buttons first and it works.
Martin Ivanov
Telerik team
 answered on 11 Aug 2023
0 answers
40 views

I have tried to create two RadNumericUpDown controls, first one has a minimum value and second one has a maximum value. I thought that I can bind automatically minimum value as Minimum for second control, but here is the problem.

Problem is happens when Minimum value of RadNumericUpDown control was updated, but updated Value of second control was not bound to source.

<StackPanel>
        <telerik:RadNumericUpDown Value="{Binding MinValue, Mode=TwoWay}"/> //changes here are not updatind value of second control
        <telerik:RadNumericUpDown Value="{Binding MaxValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                  Minimum="{Binding MinValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>

 

 

Kostiantyn
Top achievements
Rank 1
Iron
 asked on 01 Jun 2023
0 answers
72 views

Hello, I have an issue with the style of the ContextMenus.

I changed the style of the ContextMenu and it is working for TextBlock and TextBox but on Telerik controls like RadNumericUpDown and RadRichTextBox the context menu looks different.

Let's take for example the menu in the RadNumericUpDown (see attached picture).

I expect that the menu with Cut,Copy,Paste looks like other menus.

I tried to define in RadNumericUpDown.Resources a style for ContextMenu and RadContextMenu (change the Background property) but it doesn't work.

When I change the Foreground property of the TextBlock style inside RadNumericUpDown.Resources, I can see that the text color changed.

I hope you can guide me on this matter.

Thanks,

Alex

alex
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 29 May 2023
1 answer
74 views

Hello. I am trying to add a simple Tooltip to the RadNumericUpDown control. On the style, the Tooltip content is set to RelativeSource Self, Path Value.

The problem is that my value is double and the tooltip is 3 decimal points. The RadNumericUpDown can be configured to use 1,2, or 3 decimal points but the Tooltip content is always 3 decimal points.

I tried to bind the content to the Display Text (the TextBlock inside the RadNumericUpDown) but I found that you are not raising property changed for this property. 

 

How can I update the property to show the decimal numbers as the dependency property of the RadNumericUpDown?

alex
Top achievements
Rank 2
Bronze
Iron
Iron
 updated answer on 13 Jan 2023
1 answer
70 views

Hello,

I have a xaml with RadGridView which contains 4 columns. One of the columns has DataMemberBinding to a Double number/property and a cell template with a NumericUpDown control which is binded to the same Double property.

When I click the RadNumericUpDown arrow to change the value and the control remains Focusded and click immediatly the CellHeader for sorting, sometimes the value of some rows are changed to be the value of other rows. This is happens when I click the header many times with RowVirtualization=False.

If I click the arrow of the RadnumericUpDown and then I click another control to remove the focus and then I can click the header many times and the issue can't be reproduced. The update source trigger is PropertyChanged.

Sometimes during sorting the value is changed and then restored to the correct one.

Please I would like to know if you can fix it or give me some workaround. This is a very simple requirement (sorting). 

Martin Ivanov
Telerik team
 answered on 28 Oct 2022
4 answers
165 views
Hi, is there a way to change the data type returrned by the NumericUpDown's value? I need it to be int, not double, because it's mapped to a database field which has an int type, and I'm getting a conversion error. Thanks.
alex
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 22 Oct 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?