Ms sql decimal precision

Ms sql decimal precision

pdusppdusp Posts: 4Questions: 2Answers: 0

Hello!
Please tell me how to set up for ms sql column decimal(12,3) three decimal part position no more in my grid.
I want to protect user to insert more decimal part.
Is it possible?
Thank you

Answers

  • pdusppdusp Posts: 4Questions: 2Answers: 0

    Thank you!
    In ms sql I declare decimal(10.2) and only two items can be fractional parts. User can not enter more decimal positions.

    I care more about the user's limitation, he can not write too many decimal parts. Is the editor able to control the decimal number format?
    In addition, in DE and other countries, the decimal separator is a comma and, for example, in the US is a dot. Can the editor use global national user settings from a web browser?
    Piotr

  • allanallan Posts: 48,464Questions: 1Answers: 7,020 Site admin

    I'm not entirely clear how your question relates to DataTables. Could you clarify that for me?

    Thanks,
    Allan

  • pdusppdusp Posts: 4Questions: 2Answers: 0

    Dear Allan,
    I give you example:

    Ok format: 9999.99
    Nok format 9999.999

    User should use only two decimal part, when not then form is not valid. Is it possible?

  • tangerinetangerine Posts: 2,177Questions: 16Answers: 239

    @Allan - the op is using the Editor.

    @pdusp - I think you will need to provide your own custon formatter. First check the docs, depending on whether you have PHP or .NET.
    You will need to decide what to do about rounding, where more than two decimal places are entered.

  • allanallan Posts: 48,464Questions: 1Answers: 7,020 Site admin

    Are you looking for the number renderer which can be used to format numbers shown in the table?

    Allan

Sign In or Register to comment.