formatting text (digits) in RADLabel

2 posts, 0 answers
  1. Michael
    Michael avatar
    2 posts
    Member since:
    May 2008

    Posted 06 Aug 2008 Link to this post

    How can i format text (digits) in a RADLabel to be shown in a currency format?
    Example: 7,97962 -> 7,97 €
  2. Georgi
    Georgi avatar
    212 posts

    Posted 08 Aug 2008 Link to this post

    Hello Michael,

    RadLabel does not have such feature to format the displayed value of its Text property. I would suggest to you to assign already formatted value to the Text property. In your case you could do it like this:

        float num = 7.97962f;  
        radLabel1.Text = String.Format("{0:#.##}", num);  

    If you have any other questions, please don't hesitate to write us again.

    Sincerely yours,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top