Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
625
InputMask Question - Turning 1.0 into '100%
posted

I'm trying to have a decimal value displayed as a percentage.  So, if my value is .75 - I'd like to see 75% on the screen.  If my value is .7545 - I'd want to see 75.45%

 

I'm not sure what the best way to accomplish this is - I am trying to use the InputMask on the column but I'm having trouble building an InputMask that does what I want.  Could anyone help me out or point me in a new direction?

Parents
No Data
Reply
  • 45049
    Suggested Answer
    posted

    What you're looking for is the Format property of the column object.  Set this to "p", which is the standard .NET format string to parse numeric data into a percernt (including translating ".7545" to "75.45%").

    The Format property applies when cells are not in edit mode.  There is no InputMask property to achieve the same result while in edit mode.  I believe you'd need to write a DataFilter if you want to see a value of "75.45%" when either in or out of edit mode, and to store that value as ".7545" in the underlying data.

Children
No Data