Introduction
Another way to is to handle the ItemDataBound event.
Background
You want to do colspan on a DataGrid header.
Using the code
Catch ItemDataBound
. Test for the header. You can also do colspan tricks to data rows.
Private Sub AreaGrid_ItemDataBound(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) _
Handles AreaGrid.ItemDataBound
If e.Item.ItemType = ListItemType.Header Then
e.Item.Cells.RemoveAt(2)
e.Item.Cells(1).ColumnSpan = 2
Return
End If
End Sub
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.