It's probably the columnmappings. Are you adding the TableStyle and
ColumnStyle before you bind or after: Try this....
dg.SuspendLayout()
Const ng As String = "NOT GIVEN"
Dim tsMain As New DataGridTableStyle
tsMain.MappingName = AllData.Tbl_Job_Tracking.TableName
'Work Type Column
Dim csWorkType As DataGridTextBoxColumn = New DataGridTextBoxColumn
csWorkType.MappingName = AllData.Tbl_Job_Tracking.Columns(0).ColumnName
csWorkType.HeaderText = "Work Type"
csWorkType.Width = 70
tsMain.GridColumnStyles.Add(csWorkType)
'Job Number Column
Dim csJobNumber As New DataGridTextBoxColumn
csJobNumber.MappingName = AllData.Tbl_Job_Tracking.Columns(1).ColumnName
csJobNumber.HeaderText = "Job #"
csJobNumber.Width = 65
csJobNumber.NullText = ng
tsMain.GridColumnStyles.Add(csJobNumber)
tsMain.GridColumnStyles.Add(csDeleteResp)
dg.TableStyles.Add(tsMain)
dg.ResumeLayout()
"Tim Nelson" <ti***************@softhome.net> wrote in message
news:#m**************@TK2MSFTNGP10.phx.gbl...
I thought there should be simple way of setting the column width in the
a DataGrid. I've set up a table style (properties tab) that lengthen the
columns,
but I can't seem to bind this table style to the grid (or it's columns I
guess). No
matter what I do the grid keeps a standard column size for each column.
Can anyone throw me a bone here?
Thanks.