This is a migrated thread and some comments may be shown as answers.

problem with remove .000 in grid cloumn

2 Answers 69 Views
GridView
This is a migrated thread and some comments may be shown as answers.
moj
Top achievements
Rank 1
moj asked on 08 Jun 2019, 11:26 AM

hi

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

Sort by
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.
0
moj
Top achievements
Rank 1
answered on 14 Jun 2019, 11:44 AM

hello

thank you

Tags
GridView
Asked by
moj
Top achievements
Rank 1
Answers by
Nadya | Tech Support Engineer
Telerik team
moj
Top achievements
Rank 1
Share this question
or