I use this code elsewhere and it works fine.... Difference is the situation I'm working with here is the DGV is populated by an in memory datatable.
The grid columns don't format. Do I need to format the sourcetable columns instead? Or is it the sourcetable is displaying string values?
VB.NET:
'format DGV1 formulated colums for proper number type
DataGridView1.DataSource = SourceTable
'format datagridview1 columns
Me.DataGridView1.Columns.Item(4).DefaultCellStyle.Format = "n1"
Me.DataGridView1.Columns.Item(5).DefaultCellStyle.Format = "n3"
Me.DataGridView1.Columns.Item(6).DefaultCellStyle.Format = "n3"
Me.DataGridView1.Columns.Item(7).DefaultCellStyle.Format = "n3"
Me.DataGridView1.Columns.Item(8).DefaultCellStyle.Format = "n1"
Me.DataGridView1.Columns.Item(9).DefaultCellStyle.Format = "n1"
The grid columns don't format. Do I need to format the sourcetable columns instead? Or is it the sourcetable is displaying string values?