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

ClientRowTemplate Double and Decimal Formatting

1 Answer 526 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jako
Top achievements
Rank 1
Jako asked on 22 Sep 2014, 01:00 PM
.Columns(columns =>
                          {
                              columns.Template(e => { }).ClientTemplate(" ").Title("Store Name");
                              columns.Bound(c => c.Value).Format("R {0:n2}");
                              columns.Bound(c => c.Quantity).Format("{0:n0}");
                              columns.Bound(c => c.ASP).Format("R {0:n2}");
                          })
                          .HtmlAttributes(new { style = "height: 900px;" })
                          .Events(ev => ev.DataBound("onDataBound"))
                          .ClientRowTemplate(
                                                "<tr data-uid='#: uid #'>" +
                                                    "<td ><a href='/Dashboard/Store/#= StoreId #'>" +
                                                        "#: Element #" +
                                                    "</a></td>" +
                                                    "<td class='text-right' >R " +
                                                        "#: Value #" +
                                                    "</td>" +
                                                    "<td  class='text-right'>" +
                                                        "#: Quantity #" +
                                                    "</td>" +
                                                    "<td class='text-right' >R " +
                                                       "#: ASP #" +
                                                    "</td>"+
                                                 "</tr>"     
                            )

Hello

I would like to know how to format the #: ASP # for it to format to decimal with 2  digits ({0:n2})
Regards

1 Answer, 1 is accepted

Sort by
0
Jako
Top achievements
Rank 1
answered on 23 Sep 2014, 08:40 AM
#: kendo.toString(ASP,'n2') #
Tags
Grid
Asked by
Jako
Top achievements
Rank 1
Answers by
Jako
Top achievements
Rank 1
Share this question
or