Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGridTableStyle

Status
Not open for further replies.

CookieNZ

MIS
Apr 22, 2002
48
0
0
NZ
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)
 
i think you need to do this :


ts.MappingName = "yourtablename"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top