1

enter image description here

I am using Kendo grid for editing data. My problem is that when I edit a cell, it rounds the figure to two decimal places, even if the format of the cell is 4 decimal places.

Why its behaving like this?

OnaBai
  • 40,767
  • 6
  • 96
  • 125
sony
  • 1,453
  • 3
  • 35
  • 79

1 Answers1

2

You might add an editor function for that column. Something like:

columns: [
    ...
    { 
        field: "Value",
        width: 200, 
        format: "{0:##.####}", 
        editor: function(container, options) {
            // create an input element
            $("<input name='" + options.field + "'/>")
            .appendTo(container)
            .kendoNumericTextBox({
                decimals: 4
            });
        }
    },
    ...
]

See it in action here: http://jsfiddle.net/OnaBai/p92d1q8z/

OnaBai
  • 40,767
  • 6
  • 96
  • 125