in my grid i have a column decimal but I want to remove zero after float . 750.000 -> 750
when i use FormatString = {G} or {N0} occur exception
2 Answers, 1 is accepted
0
Accepted
Nadya | Tech Support Engineer
Telerik team
answered on 10 Jun 2019, 10:05 AM
Hello Moj,
As you have already found out, number formatting in GridViewDecimalColumn is applied by making use of FormatString property. To achieve the desired result with no digits after the floating point you need to set value 0 to DecimalPlaces property which displays the number of decimal places in the GridSpinEditor. Then you can use the FormatString property as shown in the following code snippet:
decimalColumn.DecimalPlaces = 0;
decimalColumn.FormatString = "{0:N0}";
I hope this information helps. Should you have any other questions, I will be glad to help.
Regards,
Nadya
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.