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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Validate numeric entry on editing cell

Thread ID:

Created:

Updated:

Platform:

Replies:

148501 Oct 22,2019 09:10 PM UTC Oct 23,2019 07:36 AM UTC ASP.NET Core - EJ 2 1
loading
Tags: DataGrid
Angela Rogers
Asked On October 22, 2019 09:10 PM UTC

I have fields that I only want to have numbers entered in, but I don't want the up and down arrows that you get with the numericedit editType - I just want to use the stringedit editType, but validate that only numbers are entered.  I tried adding  edit="@(new { @params = new { decimals=2 } })" but that didn't work.  How can I make sure only numbers are entered?  Thank you!

Pavithra Subramaniyam [Syncfusion]
Replied On October 23, 2019 07:36 AM UTC

Hi Angela,  
 
Thanks for contacting Syncfusion support. 
 
You can achieve your requirement by using the “showSpinButton” property in edit params So you can disable the spin button of numeric textbox and ensure only the numbers are entered while editing. Please get back to us if you need any further assistance on this. 
 
[index.cshtml] 
        <e-grid-column field="EmployeeID" headerText="Name" width="120" editType="numericedit" edit="@(new {@params = new Syncfusion.EJ2.Inputs.NumericTextBox() { ShowSpinButton=false,Decimals = 2} })" ></e-grid-column> 
 
 
 
Please get back to us if you need any further assistance on this. 
 
Regards, 
Pavithra S. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon