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

Using NumericUpDown for selecting a specific sequence of values - and IsReadOnly

4 Answers 79 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Inger Marie
Top achievements
Rank 1
Inger Marie asked on 03 Feb 2011, 03:24 PM
I have an integer type property, which may only have specific values in a infinite sequence: 4, 6, 8, 12, 16.... (the sequence can be made finite because big values will never be used in this reality).

Q1: I would like the mouse wheel and the buttons to select the next valid value for the user. I saw this post (http://www.telerik.com/community/forums/wpf/numeric-up-down/use-numericupdown-as-multiplier.aspx) in the forum and figured that my problem cannot be solved either. Is this feature planned for any release?

Q2: The numericupdown should be readonly under certain circumstances (most other input-fields are textboxes and they are made readonly, not disabled). Is there some setting to remove the possibility of user input from numericupdown besides enabled=false?

Thanks,
Inger Marie

4 Answers, 1 is accepted

Sort by
0
Accepted
Boyan
Telerik team
answered on 08 Feb 2011, 10:16 AM
Hi Inger Marie,

Such functionality is not currently available for RadNumericUpDown. However if the values are constantly increasing you can use SmallChange property and set it to something bigger than 1. For example if you have 4,8,12,16  set SmallChange=4 and you are set.

Now to your second question. You can set IsEditable= false  and that will make the TextBox of the control read only.

Hope this helps. If you have further questions please let me know.

Greetings,
Boyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Inger Marie
Top achievements
Rank 1
answered on 09 Feb 2011, 08:00 AM
Thanks,

IsEditable == false is not what I seek, it will not disable the button making it possible to change the value still. I am aware that I might be able to to this by creating a custom template, I was just wondering if there already was such a functionality available.
0
Boyan
Telerik team
answered on 11 Feb 2011, 05:03 PM
Hello Inger Marie,

This is the current implementation of IsEditable= false. It just makes the Textbox read only. There is no way to achieve the desired behavior without changing the control template.

I am sorry for the caused inconvenience. Let us know if you have further questions.

All the best,
Boyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Inger Marie
Top achievements
Rank 1
answered on 17 Feb 2011, 07:50 AM
Thanks.
Tags
NumericUpDown
Asked by
Inger Marie
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Inger Marie
Top achievements
Rank 1
Share this question
or