Hello,
I am using Igx-data Grid. I have column for combination of string and number datatype.
I want to write few validations for the number column mentioned below:
1. restrict the column to max 99999.
2. Column should only allow numbers(no alphabets) . It is allowing e now.
3. No ',' should be allowed.
Hope to hear reply soon.
Thanks.
You should be able to use the same formatter from the mentioned thread to remove commas.
----------------------onColumnInit(column: IgxColumnComponent) { if(column.field =="UnitPrice") { column.formatter = (unitPrice => { return unitPrice; }); }}----------------------
https://stackblitz.com/edit/angular-grid-decimal-places-mnxftz
can i get a reply please! Code snippet to remove commas (',' ) from numeric cells
Hello Mohiko,
Can u share the code snippet to remove ',' as i am not sure how to do that. Actually by default it displays the , to 1000th place i want to remove that.
Thanks
Hello Shobhana,
I believe you can remove commas(',') from numeric cells using IgxColumnComponent's formatter function as illustrated in the thread below.https://ko.infragistics.com/community/forums/f/ignite-ui-for-angular/121349/how-many-decimal-places-can-i-show-for-data-type-number-in-igx-data-grid-angular
The return value of the formatter function will be the data that will appear in a cell.Can you please try the above to see if it meets your requirement?
Update: i was able to do for 1,2 but how can i remove ',' in the column of datatype number ex: 10,124