Need help formatting a sql float datatype

2 posts, 0 answers
  1. Anshul
    Anshul avatar
    1 posts
    Member since:
    May 2011

    Posted 17 May 2011 Link to this post

    Hi,
    I want to format a sql server float type value to the format: ###,###
    How can I do this? 
    I noticed that the format {0:c} doesn't work for float types and anyways I don't want any $ sign.
    Any help would be appreciated.
    As an example:

    <radG:GridBoundColumn DataField="VarianceVal" UniqueName="VarianceVal" HeaderText="Value Variance Rule Result"
    DataFormatString="{0:c}"></radG:GridBoundColumn>


  2. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 17 May 2011 Link to this post

    Hey Anshul,

    Try {0:N0}

    Here's a formatting cheat sheet.
    http://msdn.microsoft.com/en-us/library/s8s7t687.aspx

    Hope this helps!
    -Gimmik
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top