piscis Posted July 5, 2003 Posted July 5, 2003 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() Quote
Co2 Posted July 6, 2003 Posted July 6, 2003 Ok first the Format element of DataGridTextBoxColumn is a property so you need something like: .format = "c" From there it should work. Quote
Heiko Posted July 6, 2003 Posted July 6, 2003 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. :) Quote .nerd
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.