I want to format columns in DataGrid while form is loaded and i want the formatting to apply to complete column (all rows) at once.

The Problem: When my form is loaded there is now formatting done to the DataGrid. The formatting comes up only when i click some cell in the column and the formatting is applied to that one cell only.

DataGrid is on winform and following code is in sub Form_load.


Dim MyTableStyle As New DataGridTableStyle()
Dim Col As New DataGridTextBoxColumn()
...
Col = New DataGridTextBoxColumn()
Col.MappingName = "Customer"
Col.HeaderText = "Customer name"
Col.TextBox.BackColor = System.Drawing.Color.Red
...
MyTableStyle.GridColumnStyles.Add(Col)
...
Me.DataGrid1.TableStyles.Add(MyTableStyle)


How can i get the formatting applied automatically to the column when the form is loaded?

Thanks for any help!