locked
DataGridView + Scientific Notation RRS feed

  • Question

  • Hi,

     

    How do I prevent scientific notation formatting of my data in the DataGridView??

     

    Using ROUND() Function in SQL Server which removes the scientific notation at that end.

     

    But the scientific notation remains in the DGV.

     

    Why is this?

     

    Thanks.

    Friday, September 14, 2007 9:27 AM

Answers

  • It is under Behavior in the dialog that is titled CellStyleBuilder.

     

    You get that by selecting and opening the DefaultCellStyle Property for the column.  Do you see that?

    Friday, September 14, 2007 1:10 PM

All replies

  • Try changing the format of the cells in the column to numeric.

     

    • Right-click the dataGridView
    • Select Edit Columns
    • Select the column
    • Open the DefaultCellStyle Property dialog
    • Open the Format Property dialog
    • Select Numeric and the number of decimal places desired.

     

     

    Friday, September 14, 2007 12:52 PM
  • I don't see the Format Property Dialog.

     

    Using VS 2005.

     

    Thanks.

     

    Friday, September 14, 2007 12:57 PM
  • It is under Behavior in the dialog that is titled CellStyleBuilder.

     

    You get that by selecting and opening the DefaultCellStyle Property for the column.  Do you see that?

    Friday, September 14, 2007 1:10 PM
  •  

    great! thanks!!
    Friday, September 14, 2007 1:26 PM