Dim dgStyle as DataGridTableStyle
Dim dgTableStyle As New DataGridTableStyle()
Dim colStyle1 As New DataGridTextBoxColumn()
With colStyle1
.Alignment = HorizontalAlignment.Left
.HeaderText = "Cost"
.MappingName = "ItemCost"
.Width = 20
.format(“c”)
End With
dgTableStyle.GridColumnStyles.Add(colStyle1)
dgTableStyle.MappingName = "tblSales"
Me.DataGrid1.TableStyles.Add(dgTableStyle)
Me.DataGrid1.TableStyles.Clear()