Decimal alignment

4 posts, 0 answers
  1. Andy H
    Andy H avatar
    12 posts
    Member since:
    Oct 2009

    Posted 23 Sep 2011 Link to this post

    We are displaying result sets where the values have a varying number of decimal values, which we would like to display decimal aligned.

    One could format the values to always display the same number of decimals (say ToString("0.0000")), but the values 0.1111 and 0.888 would still not be 100% correctly aligned unless a monospaced font is used. Not ideal.

    Any other ideas?
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 23 Sep 2011 Link to this post

    Hi Andy H,

    Maybe this special column can help?

    All the best,
    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Andy H
    Andy H avatar
    12 posts
    Member since:
    Oct 2009

    Posted 26 Sep 2011 Link to this post

    I was actually looking for something that will allow met to align values similar to the insignificant decimal place-holder ("?") in Excel. Please see attached.

    Alternatively, would it be possible to write a custom formatter. Preferably the formatter should be executed after the grid has loaded so that one can apply the spacing depending on the maximum number of decimal places.
  4. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 27 Sep 2011 Link to this post

    Hi Andy H,

    By using a custom cell template and/or custom cell edit template, you can provide any kind of cell content that you like. The implementation would be up to you in this case.

    All the best,
    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top