problem with remove .000 in grid cloumn

3 posts, 1 answers
  1. moj
    moj avatar
    11 posts
    Member since:
    Jun 2019

    Posted 08 Jun 2019 Link to this post


    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. Answer
    Nadya avatar
    389 posts

    Posted 10 Jun 2019 Link to this post

    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.

    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.
  3. moj
    moj avatar
    11 posts
    Member since:
    Jun 2019

    Posted 14 Jun 2019 in reply to Nadya Link to this post


    thank you

Back to Top