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

Decimal format not working in Gid

1 Answer 2729 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sp
Top achievements
Rank 1
Veteran
Sp asked on 13 Aug 2020, 10:40 AM

Hi Team,

Very Good!!

Currently i am using Kenod.mvc.dll for 2018 version . 

I am not able to restict decimal places in grid bound column , could you help on this . i have tried different format's  but didn't successed.

  c.Group(p => p.Title((string)ViewBag.Month01)
                                            .Columns(f => f.Bound(fo =>fo.month01FD).Format("0:n1}").                                               Width(colWidthFD).ClientFooterTemplate("#=getTotals('month01FD',false)# ").HtmlAttributes(new { @class = "telerik-edit-cell-                                                       inline" }))

                                            .Columns(f => f.Bound(fo => fo.month01AC).Format("{0:n1}").Width(colWithAC).ClientFooterTemplate("#=getTotals('month01AC',true)#").HtmlAttributes(new { @class = "telerik-edit-cell-inline" })));

 

 

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 17 Aug 2020, 08:29 AM

Hi Sp,

Can you try using the following 'format' definition?

Format("{0:0.##}")

You can see in this Dojo, how the number of "#" signs in the format configuration is controlling the number of the fields that appear after the decimal point. 

Let me know if the suggested format resolves the issue in your application. If not, can you tell me the exact 2018 version that you use? 

Regards,
Petar
Progress Telerik

Tags
Grid
Asked by
Sp
Top achievements
Rank 1
Veteran
Answers by
Petar
Telerik team
Share this question
or