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 derfloh 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
Joined
Apr 22, 2002
Messages
48
Location
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