ClientTemplate - Math Round \ String Format with no decimals

3 posts, 0 answers
  1. Yaniv
    Yaniv avatar
    6 posts
    Member since:
    Sep 2013

    Posted 06 Mar 2014 Link to this post

    I can get any data with the client template and it works fine, but i cannot find a way to round a 'Double' value as math round or in string.Format("C0")
    in the client template. I want to round the dataItem.QuoteSumDollars which is a 'Double' with no decimal digits.
    Here is my HtmlChart Series:

                                <telerik:LineSeries Name="Quote" DataFieldY="QuoteSumDollars">
                                            Quote #=dataItem.QuoteID#

    Many thanks.
  2. Danail Vasilev
    Danail Vasilev avatar
    1476 posts

    Posted 10 Mar 2014 Link to this post

    Hello Yaniv,

    You can use the kendo.format() method in order to format values in templates. More information on the matter is available in Formatting Numbers help article, in the section called Formatting Labels and Tooltips by using their Client Templates.

    Danail Vasilev

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  3. DevCraft R3 2016 release webinar banner
  4. Yaniv
    Yaniv avatar
    6 posts
    Member since:
    Sep 2013

    Posted 18 Mar 2014 in reply to Danail Vasilev Link to this post

    It worked by doing:

Back to Top