Decimal places in DGV in C #

0

Here are 2 images that summarize my problem.

Image of db (Access)

DataGridViewImage

Whenthevalueswithdecimalplaces"0" are released the DGV does not show, eg:
1.00 = 1
1.50 = 1.5

Follow the properties of the field:

Any way to get the full values to DGV ??

    
asked by anonymous 13.10.2016 / 19:41

1 answer

0

I was able to solve my problem with the following codes!

     NomedoDataGrid.Columns[Numero ou Nome da Coluna].DefaultCellStyle.Format = "C2"   

monetary values with two decimal places

     NomedoDataGrid.Columns[Numero ou Nome da Coluna].DefaultCellStyle.Format = "N2" 

numeric values with two decimal places

     NomedoDataGrid.Columns[Numero ou Nome da Coluna].DefaultCellStyle.Format = "d" 

format for date

Hugs!

    
13.10.2016 / 20:00