I have not had my previous posts answered and I really
need to fix this problem. Please help.
I have populated a datagrid in code but I would like to
change the header text and width of two of the columns.
I used the following code after binding the dataset to
the grid:
Dim cstStartTime As New DataGridTextBoxColumn
cstStartTime.MappingName = "StartTime"
cstStartTime.HeaderText = "Start Time"
cstStartTime.Width = 1550
I did this twice. Then I added the GridColumnStyles and
finally did a TableStyles.Add.
When the grid displays the data, no columns appear. What
am I doing wrong?
Thanks,
Gary
Michael Tkachev - 07 Apr 2004 10:54 GMT
DataGrid.Columns[0].HeaderText = "bla-bla";
DataGrid.Columns[0].ItemStyle.Width = 1500;
Remember! You have to do it before databind of datagrid.
> I have not had my previous posts answered and I really
> need to fix this problem. Please help.
[quoted text clipped - 19 lines]
>
> Gary