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.

NumericTextBox comma separator in grid does not work

Thread ID:

Created:

Updated:

Platform:

Replies:

129298 Mar 10,2017 03:50 AM Mar 13,2017 08:00 AM Angular 1
loading
Tags: ejGrid
Rykunov Alex
Asked On March 10, 2017 03:50 AM

Greetings.
I have a grid with numericTextBox as an editor. I have the requirement for comma to be a separator between the whole and fractional parts (instead of a dot). The groupSeparator parameter is supposed to do exactly that, as i understand. In the 'edit' mode of the numericTextBox it works perfectly, and i can input any value I want with comma as a separator. However, when i snap out of edit mode, the field value becomes, as the comma does not exist. As an example, the 2,87 becomes 287.

The code for the grid is the following (some columns deleted for better view):
[dataSource]="syncJobs"
[allowSorting]="true"
[allowSelection]="true"
[allowPaging]="true"
[selectionType]="single"
[allowTextWrap]="true"
[allowResizing]="true"
[editSettings]="{'allowEditing':'true', 'editMode':'batch', 'showConfirmDialog':false}"
[contextMenuSettings]="{enableContextMenu: true, contextMenuItems:[], customContextMenuItems: [{id:'del', text:'Удалить запись'}]}"
(cellSave)="saveRecord($event)"
(queryCellInfo)="cellFormat($event)"
(contextClick)="contextMenuActions($event)"
(contextOpen)="contextMenuActions($event)">

Prasanna Kumar Viswanathan [Syncfusion]
Replied On March 13, 2017 08:00 AM

Hi Alex, 

Thanks for contacting Syncfusion support. 

If you need comma to be a separator for the fractional parts, use locale API of ejGrid. In locale API set “de-DE” to get the comma as a separator for the numbers.  

Find the code example: 


<ej-grid [allowPaging]="true" [allowSorting]="true" [dataSource]="gridData" [columns]="columns" [editSettings]="{'allowEditing':'true', 'editMode':'batch'}" [toolbarSettings]= "tool" locale= "de-DE"> 
<e-columns> 
        <e-column field="OrderID" headerText="Order ID" [isPrimaryKey]="true" width="75" textAlign="right" ></e-column>        
        <e-column field="Freight" headerText="Freight" width="75" textAlign="right" format="{0:C}"></e-column> 
        ------------------------------ 
</ej-grid> 
 
----------------------------------------------- 
<script src="vendor/ej.angular2.js"></script> 
<script src="vendor/ej.culture.de-DE.min.js"></script> 


Note: To get the particular culture we need to refer the  “ej.culture.de-DE.min.js” script file in the sample.  

Script Location: C:\Program Files (x86)\Syncfusion\Essential Studio\15.1.0.37\JavaScript\assets\scripts\i18n 
Regards, 
Prasanna Kumar N.S.V 


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.

;