Displaying of decimal places in gridview of .NET forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adigita
    New Member
    • Nov 2008
    • 1

    Displaying of decimal places in gridview of .NET forms

    How to disply decimal part in the grid view of .Net forms ?

    Example

    Field Name : ITEM RATE NUMBER(11,4) (ORACLE DATABSE)

    OUTPUT[ TO BE DISPLAYED AS

    1.09 1.0900

    1.9 1.9000

    1.999 1.9900

    1 1.0000

    Thanks
    C.ADITYA KUMAR NAIDU
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    Example:
    Code:
    String.Format("{0:0.00}", 123.4567);      // "123.46"
    So if you want 4 digits to the right of the decimal use a format string of "0:0.0000"

    Comment

    Working...