Trying to follow ManniAT's Colspan override... thread, but instead of changing the colspan on a nested view item, I am trying to change the colspan on a gridgroupheader item. In my case, I just want to get rid of the colspan altogether. I've tried a number of variations, including accessing the colspan attribute from the itemCreated as well as the prerender events, and changing the colspan value to "0" as well as trying grh.DataCell.Attributes.Remove("colspan").
Protected Sub RadGrid3_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid3.ItemCreated
If TypeOf e.Item Is GridGroupHeaderItem Then
CType(e.Item, GridGroupHeaderItem).DataCell.Attributes("colspan") = 0
End If
End Sub
Protected Sub RadGrid3_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles RadGrid3.PreRender
For Each grh As GridGroupHeaderItem In CType(sender, RadGrid).MasterTableView.GetItems(GridItemType.GroupHeader)
grh.DataCell.Attributes.Remove("colspan")
Next
End Sub
Neither of these seem to work. When I try to change the colspans value to 0, I end up with duplicate colspan attributes for the TD (<td colspan="0" colspan="3"><p>R.V.'S</p></td>), and when I try to remove it, I still see the original colspan="3" attribute. (<td colspan="3"><p>R.V.'S</p></td>
Any help will be appreciated.
Thank you,
-J.
Protected Sub RadGrid3_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid3.ItemCreated
If TypeOf e.Item Is GridGroupHeaderItem Then
CType(e.Item, GridGroupHeaderItem).DataCell.Attributes("colspan") = 0
End If
End Sub
Protected Sub RadGrid3_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles RadGrid3.PreRender
For Each grh As GridGroupHeaderItem In CType(sender, RadGrid).MasterTableView.GetItems(GridItemType.GroupHeader)
grh.DataCell.Attributes.Remove("colspan")
Next
End Sub
Neither of these seem to work. When I try to change the colspans value to 0, I end up with duplicate colspan attributes for the TD (<td colspan="0" colspan="3"><p>R.V.'S</p></td>), and when I try to remove it, I still see the original colspan="3" attribute. (<td colspan="3"><p>R.V.'S</p></td>
Any help will be appreciated.
Thank you,
-J.