Select from value list instead of increment

4 posts, 1 answers
  1. Stefan
    Stefan avatar
    3 posts
    Member since:
    May 2009

    Posted 16 Jun 2011 Link to this post

    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
  2. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 16 Jun 2011 Link to this post

    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>>
  3. DevCraft banner
  4. Stefan
    Stefan avatar
    3 posts
    Member since:
    May 2009

    Posted 16 Jun 2011 Link to this post

    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
  5. Answer
    Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 16 Jun 2011 Link to this post

    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>>
Back to Top