Error in kendo grid Incell edit for numeric input text box.

0 Answers 58 Views
Grid Stepper ToolTip
n/a
Top achievements
Rank 1
n/a asked on 16 Mar 2023, 02:51 PM

Value column has an inline validation of max and min. On entering the correct values also I am getting this error. 

I am using this JS code for custom input control. Please suggest me some approach to resolve this error.

if (e.model.UnitTypeCode === "UNIT_LOOKUP_FLOAT") {

                var dataItem = $("#DesignMaterialSystemAttribute").data("kendoGrid").dataSource.get(e.model.DesignMaterialSystemAttributeId);
                console.log(dataItem)

                var min = parseFloat(dataItem.MinAcceptableText);
                var max = parseFloat(dataItem.MaxAcceptableText);
                var input = $("<input data-val='true' autocomplete='off' onblur='Value_validate()' onclick='setTwoNumberDecimal(this)' min = '" + min + "' max='" + max + "' type='number' step='0.01' data-validate='false' name='AttributeValue' id='AttributeFloatId' data-bind='value: AttributeValue' style='width: 70% ; outline:none' />");

                
                var grid = $("#DesignMaterialSystemAttribute").data("kendoGrid");
                var AttributeNumberValue = null;
                var data = grid.dataSource.data();
                var gridRowTr = grid.dataItem($(e.container).closest("tr"));
                var currentRowIndex = data.indexOf(gridRowTr);
                $(document).on('input', '#AttributeFloatId', function () {
                    AttributeNumberValue = $("#AttributeFloatId").val();
                    data[currentRowIndex].set("AttributeValue", AttributeNumberValue);
                    data[currentRowIndex].set("AttributeText", AttributeNumberValue);
                })

            

 

 

 

No answers yet. Maybe you can help?

Tags
Grid Stepper ToolTip
Asked by
n/a
Top achievements
Rank 1
Share this question
or