One column in my gridview contains about a paragraph of text in each row. For this particular column, I need to set a fixed width and allow word wrap. I tried this syntax:
I don't think that the itemstyle lines ever executed. I put a breakpoint on GridView1.Columns(4).ItemStyle.Width = 50, but the breakpoint never triggered. I have no idea why that happened. The gridview absolutely has five columns...i can see them.
So I really have two questions...why didn't those lines execute, and if they had executed would that have fixed the problem??
Code:
If IsPostBack Then
With GridView1
.DataSource = myDataView
.DataBind()
End With
If GridView1.Columns.Count > 3 Then
GridView1.Columns(4).ItemStyle.Width = 50
GridView1.Columns(4).ItemStyle.Wrap = True
End If
end if
I don't think that the itemstyle lines ever executed. I put a breakpoint on GridView1.Columns(4).ItemStyle.Width = 50, but the breakpoint never triggered. I have no idea why that happened. The gridview absolutely has five columns...i can see them.
So I really have two questions...why didn't those lines execute, and if they had executed would that have fixed the problem??