We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Numeric edit options not working

Thread ID:

Created:

Updated:

Platform:

Replies:

130546 May 17,2017 10:34 AM May 18,2017 09:01 AM ASP.NET Core 2
loading
Tags: Grid
R Brian Lindahl
Asked On May 17, 2017 10:34 AM

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?

R Brian Lindahl
Replied On May 17, 2017 03:17 PM

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


Attachment: WebApplication1_c4c639f2.zip

Jayaprakash Kamaraj [Syncfusion]
Replied On May 18, 2017 09:01 AM

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. 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;