how to change the format of data displayed in a datagridView RRS feed

  • Question

  • Hi,

    I show Price information of a product in one of the columns of a datagridView (DGV)

    Now the format is something like 45,10000.

    that's too many zeroes. I' like to change the format to 45,10

    In general, how can i determine the format of data displayed in a DGV?

    thank you
    Sunday, November 9, 2008 1:10 PM


  • Hi Peeters


    45,10000 = 45,10?

    Cut the number of zero will cut your price too. Do you really want to cut it? Or did you miss type the 45.10000 with 45,10000?


    If the price is a decimal, you can set the DefaultCellStyle property, set Format to “Numeric, Decimal Places 2”. All these can be done in the VS Designer.


    If you have any question, please feel free to tell me.



    Kira Qian

    Tuesday, November 11, 2008 3:52 AM