Comments

1 comment

  • Avatar
    Bindhu

    Hi Rodrigo,

    Please use the below JavaScript code to ensure that only whole numbers are accepted for fields defined with the Number datatype.

    eFormEvents.onFormLoadComplete = function() {

      $('.k-grid-addNewRecord').click(function(e) {

         var numericTextBox = $(e.currentTarget.parentElement.parentElement).find("input[data-role='numerictextbox']").data("kendoNumericTextBox");

         numericTextBox.setOptions({decimals: 0, restrictDecimals: true, format: "n0"})

      });

    }

    Hope this helps!

    Thanks

    0
    Comment actions Permalink

Please sign in to leave a comment.