Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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()

Posted

Ok first the Format element of DataGridTextBoxColumn is a property so you need something like:

 

.format = "c"

 

From there it should work.

Posted
Searching would be easier (for dumbos as I am, at least) if you posted the error message. And the line of code which gets rejected. :)
.nerd

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...