Does anyone know why I cannot get this code to work on VB.NET?

piscis

Well-known member
Joined
Jun 30, 2003
Messages
54
Code:
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(
 
Ok first the Format element of DataGridTextBoxColumn is a property so you need something like:

Code:
.format = "c"

From there it should work.
 
Back
Top