Masked Edit Box

4 posts, 1 answers
  1. Robert Gouin
    Robert  Gouin avatar
    11 posts
    Member since:
    Oct 2009

    Posted 08 Mar 2011 Link to this post

    Is there a way that you can allow people to use this text box to either enter feet and inches or just inches for their height and get the value just in inches?
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 08 Mar 2011 Link to this post

    Hello Robert,

    You may be better off using two RadSpinEditors for this, using a Max value of 12 for the inches and something else sensible (7?) for the feet.
    There is also this article on Code Project which you may be interested in. Bear in mind though of course that this is not a Telerik solution, and is only using the standard Microsoft controls.

    I hope that this helps, but let me know if you need more information
  3. Guss
    Guss avatar
    26 posts
    Member since:
    Nov 2011

    Posted 19 Sep 2016 in reply to Robert Gouin Link to this post

    An easy cheat is:


    Make the decimal seperator a single quote (feet). Then user type exactly as you speak.. "I'm 6 foot 3"    and you type it 6'3    
    Then what ever you do with the value which is 6.3 (six, with a decimal 3) is you choice. (Split the value on the ".", and then you know its 6'3" and convert and store it in an STANDARD INTERNATIONAL format. The conversion can be done easy in your SQL stored procedure.   
    I have a numeric textbox with a dropdown next to it where the person choose m, cm, mm or " ' and then that goes to the stored procedure and I handle it there... I store everyone's height in my choice (cm in my case). My select stored procedure, look at the users user preference (lenght measurement) and then know how to transform the value.

    When the dropdownbox builds, I set group separator, decimal separator, max. min, etc, based on the users' choice of lenght measurement.

    Similar I do for weight, volume, temprature.

  4. Hristo
    Hristo avatar
    1028 posts

    Posted 20 Sep 2016 Link to this post

    Hi Guss,

    Thank you for updating the thread.

    I am sure the community will benefit from your reply.

    Should you further questions please do not hesitate to write back.

    Hristo Merdjanov
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms. For more information check out this blog post and share your thoughts.
Back to Top