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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Numeric Edit in Grid without formatting

Thread ID:

Created:

Updated:

Platform:

Replies:

141601 Dec 19,2018 11:19 AM UTC Dec 20,2018 12:44 PM UTC ASP.NET MVC 1
loading
Tags: Grid
Sandip
Asked On December 19, 2018 11:19 AM UTC

Hello, I am using syncfusion Ej Grid in MVC.

I am using grids.EditMode(EditMode.InlineForm) for add and edit and I have a couple of numeric fields which I am adding in grid like this.
but when it loads data in it it has formatting of thousand like '1,011' when we remove focus from the textbox.  i wanted to remove this formatting so that it will always display data like '1011'   
Do we have any option for this to achieve this?

col.Field(x => x.Thickness)
        .TextAlign(TextAlign.Left)
        .EditType(EditingType.NumericEdit).NumericEditOptions(new EditorProperties() { DecimalPlaces = 0, ShowSpinButton = false })
        .Width(50)
        .Add();

Vignesh Natarajan [Syncfusion]
Replied On December 20, 2018 12:44 PM UTC

Hi Sandip, 
 
Thanks for contacting Syncfusion Support. 

From your query, we suspect that you need to display the value inside the numeric textbox without (,) separator for thousand. To remove the comma for Numeric values while on Focusing, you can use GroupSeparator property  of ejNumericTextBox inside the NumericEditOptions.
 
 
Please refer to the code example:- 
 
@(Html.EJ().Grid<OrdersView>("Grid") 
        .Datasource(ds => ds.URL("/Grid/UrlDataSource") 
        .Adaptor(AdaptorType.UrlAdaptor)) 
        .AllowPaging() 
         
 
        .Columns(col => 
        { 
            col.Field("VAT").TextAlign(TextAlign.Left).EditType(EditingType.NumericEdit).NumericEditOptions(new EditorProperties() { DecimalPlaces =0,GroupSeparator = "" }).Width(50).Add(); 
        }) 
         ) 
 
 
Pleaser refer to the API Link:- 
 
Please get back to us if you have further queries. 
 
Regards, 
Vignesh Natarajan 
 


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

;