Bound Data Grid View numeric formatting not working


I have a bound datagridview.

I have code that is being called just before the .show for the form that is supposed to format a column.

With Me.colLogsizemb
.ValueType = GetType(Double)
.DefaultCellStyle.Format = “n2”
End With

After I set the column formatting, I then fill teh form with Me.dgvLog.DataSource = _List

The formatting doesn’t seem to be working because I am getting decimal values like 9.001323

Any suggestion as to what I am doing wrong?

Shawn R

PS, we are using

  • You must to post comments

Can you send a small test case? Sounds like the column may be recreated. I have tried several cases but always get the correctly formatted value.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.