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

Select from value list instead of increment

3 Answers 58 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stefan
Top achievements
Rank 1
Stefan asked on 16 Jun 2011, 07:36 AM
Hi,

is it possible to set a list of selectable values instead of min/max/inc?

For example I would like to select f stop values (it's a photography app): 2, 2.8, 4, 5.6, 8, 11, ...

If that's not possible with the NumericUpDown, can you suggest an other control?


Regards
Stefan Lieser

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 16 Jun 2011, 07:58 AM
Hi Stefan,

Thanks for contacting us and for your question.

Currently, RadNumericUpDown works with a Minimum, Maximum and a predefined step. You could mimic the behavior you would like to achieve by changing the step each time the user changes the value so that the next value is the next from your f stop values series.

Another possibility would be to use the RadListPicker control and pre-load all possible values that you have and let the user choose from them.

I hope this helps.

Do not hesitate to get back to us in case you have further questions or need assistance.

Kind regards,
Deyan
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
Stefan
Top achievements
Rank 1
answered on 16 Jun 2011, 08:27 AM
Thanks for your answer. The problem with changing the increment is that increment/decrement values may be different. For example if user has selected 2.8 the increment has to be 0.4 to get 3.2. BUT the decrement needs to be 0.3 to get 2.5.

Would it be possible to register a handler to the ValueChanged event and correct the value there to the next/previous value from the list?


Cheers
Stefan Lieser
0
Accepted
Deyan
Telerik team
answered on 16 Jun 2011, 03:39 PM
Hi Stefan,

Thanks for writing back.

Yes, you can use the ValueChanged event and reset the value according to your requirements. You should be careful, though, that the ValueChanged event will be fired once again after you reset the Value of the control.

Do not hesitate to write back in case you have further questions or need assistance.

Kind regards,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
NumericUpDown
Asked by
Stefan
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Stefan
Top achievements
Rank 1
Share this question
or