Numeric edit options not working

I have several grids where the field is a float, and therefore has e-numeric-edit-options set to allow for decimal places. All are similar to:

    <e-column field="CostPerUnit"
              header-text="Cost per unit"
              edit-type="Numeric"
              format="{0:C4}">
      <e-numeric-edit-options decimal-places="4"
                              show-spin-button ="false"/>
    </e-column>

None of them are behaving as if they see the options - can't type a decimal point, and the spin button is still there. I looked at the page source, and it looks like the fields are OK in the JS version:

{
     "field":"CostPerUnit",
     "headerText":"Cost per unit",
     "editType":"numericedit",
     "format":"{0:C4}",
     numericEditOptions:{"showSpinButton":false,"decimalPlaces":4}
}


Am I doing something wrong? or is this broken?

2 Replies

RB R Brian Lindahl May 17, 2017 07:17 PM UTC

I've reproduced this in a sample application, which is attached.


Attachment: WebApplication1_c4c639f2.zip


JK Jayaprakash Kamaraj Syncfusion Team May 18, 2017 01:01 PM UTC

Hi Brain, 

Thank you for contacting Syncfusion support. 

We have logged the issue, “numeric-edit-options child tag not working in asp.net core” and it will be included in our Volume 2 service pack 2 2017 release which is expected to be rolled out at the month of June, 2017.  

As of now, we suggest you to use numeric-edit-options attribute of Grid Column to set decimalPlaces as 4 in numeric column. Please refer to the below code example and sample. 

@using Syncfusion.JavaScript.Models 
@addTagHelper "*, Syncfusion.EJ" 
 
@model IEnumerable<WebApplication8.Models.DateTester> 
<ej-grid id="GridContainer" 
         allow-resize-to-fit="true" 
         allow-sorting="true" 
         allow-text-wrap="true" 
         allow-paging="true" 
         is-responsive="true" 
         enable-responsive-row="true" 
         load="onLoad"> 
.. 
 
    <e-columns> 
.. 
 
       <e-column field="Value" 
                  header-text="Value" 
                  edit-type="Numeric" 
                  format="{0:C4}" numeric-edit-options="@new EditorProperties() { DecimalPlaces = 4,ShowSpinButton=false}" > 
        </e-column> 
    </e-columns> 
</ej-grid> 


Regards, 

Jayaprakash K. 
 


Loader.
Up arrow icon