Bound Data Grid View numeric formatting not working

0
0

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?

Thanks,
Shawn R

PS, we are using VB.net

  • You must to post comments
0
0

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.