I have programmatically created a new grid style, but can not seem to get the datagrid to use it. What am I diong wrong?
Dim ts As New DataGridTableStyle()
Dim cs As DataGridColumnStyle
cs = New DataGridTextBoxColumn()
cs.Width = 20
cs.MappingName = "ID"
cs.HeaderText = "Call Number"
ts.GridColumnStyles.Add(cs)
cs = New DataGridTextBoxColumn()
cs.Width = 75
cs.MappingName = "Date"
cs.HeaderText = "Call Date"
ts.GridColumnStyles.Add(cs)
dgcustomercall.TableStyles.Add(ts)
Dim ts As New DataGridTableStyle()
Dim cs As DataGridColumnStyle
cs = New DataGridTextBoxColumn()
cs.Width = 20
cs.MappingName = "ID"
cs.HeaderText = "Call Number"
ts.GridColumnStyles.Add(cs)
cs = New DataGridTextBoxColumn()
cs.Width = 75
cs.MappingName = "Date"
cs.HeaderText = "Call Date"
ts.GridColumnStyles.Add(cs)
dgcustomercall.TableStyles.Add(ts)