In the database is the numeric (38,6) type, shown to the DataGridView interface is always followed by 6 0 (for example: 20000.000000), want to just display integers, a burst of easy to find, but no detailed documentation comments, and some in the format string with the # symbol (such as: ##.##), do not know what to do. can do so.
DataGridView dgvdiscipline= this as DataGridView; dgvdiscipline.columns["anticipatingincome"]. defaultcellstyle.format="0";
An integer is displayed on the interface. If you also want to display in thousands of points (for example, 2755555.000000000 needs to be shown as 2,755,555.0000). Can do this:
DataGridView dgvdiscipline= this as DataGridView; dgvdiscipline.columns["anticipatingincome"]. defaultcellstyle.format="N4";
n represents a thousand-digit display, and the number after n indicates that several digits are retained after the decimal point. Only as a catalyst, hope to be useful.
Reference from StackOverflow Quiz
DataGridView using the DefaultCellStyle property does not display decimals