Full customization of display

4 posts, 0 answers
  1. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 24 Jan 2014 Link to this post

    Hello,
    it would be great if we can have more control about the formatting of the value in the up/down.
    I have a scenario where I must use the control to edit a duration in minutes. When the duration is 1 hour or more, it should be displayed as 1:05, for example.
    This scenario would be feasible if you had a FormatValue and a ParseValue virtual methods, so we can inherit from the base class and customize completely the display.
    Patrick
  2. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 29 Jan 2014 Link to this post

    Hello Patrick,

    As far as I understand the requirement you need to display time duration in the NumericUpDown and the SmallChange step to be 5 minutes? What I can suggest you in this case is to use the ValueChanged event where you can get the new value and modify it as required. For your convenience I prepared and attached here a sample project which demonstrates the exact approach.

    I would also like to thank you for your feedback, you could log that as a feature request in our Feedback portal. It will be reviewed and it might be considered for implementation later in time depending on the customers demand.

    Hope this helps.

    Regards,
    Kalin
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 29 Jan 2014 in reply to Kalin Link to this post

    Hello Kalin,
    that's an interesting solution, but the durations are mainly in minutes and rarely in hours, so it would be nice that, if the user enters 12, the value was 12 minutes and not 12 hours.
    The main use is for the duration of the sets in a volleyball or beach volleyball match.
    Patrick
  5. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 03 Feb 2014 Link to this post

    Hi Patrick,

    You can execute your logic on ValueChanged event and change the value based on your needs. In the example we've sent you, the value is just shown with custom delimiter and if the "minutes" are more than 59, the value is parse as TimeSpan. This solution obviously has some issues, but you can modify it further. You can also use KeyDown event of RadNumericUpDown and combine it with ValueChanged in order to get the exact logic you need.

    Of course you can add this feature request in our feedback portal and if there is enough customer demand, we'll consider adding it to our control.

    Hopefully this helps. Feel free to contact us in case you have any problems or concerns.

    Regards,
    Rosen Vladimirov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top