Remove trailing zeros

4 posts, 0 answers
  1. shirley wang
    shirley wang avatar
    28 posts
    Member since:
    Mar 2010

    Posted 27 Oct 2010 Link to this post

    Dear People,

    I'm looking for a way to remove trailing zero's from numeric fields.

    e.g.

    1.00 should display as 1

    1.50 should display as 1.5

    0.50 should display as 0.5

    Any idea?


    Best wishes

    Shirley Wang
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 28 Oct 2010 Link to this post

    Hello Shirley,

    Thank you for contacting us.

    To achieve your goal you can use the NumberDecimalDigits property of the NumericUpDown control.

    If you have any other questions please let us know.

    Sincerely yours,

    Konstantina
    the Telerik team

     

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. shirley wang
    shirley wang avatar
    28 posts
    Member since:
    Mar 2010

    Posted 28 Oct 2010 Link to this post

    Hello Konstanti,

    Thank you for your answer. But it is not what i want.

    I have set NumberDecimalDigits. The problem is, here is an example.

    I have a person A weight 70.3 kg.

    If i set NumberDecimalDigits = 2, i have 70,30 kg be showed (with trailing zero).
    If i set NumberDecimalDigits = 1, i have 70,3 kg be showed (beautiful). But
    the user has no opportunity to change the weight to 70,35 kg.

    Best wishes

    Shirley
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 01 Nov 2010 Link to this post

    Hello Shirley,

    Unfortunately, there is no such feature supported by the RadNumericUpDown control. You can implement it using the LostFocus event and change the Text of the TextBox.

    Please feel free to contact us again if you have any other questions.

    Best wishes,
    Konstantina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top