Hi
I've stuck with following problem.
I have a grid where I do use SetRenderMethodDelegate method to customize header row (build two-level header), i.e. following:
When Command row is visible it is rendered with different collspan count for IE 8 in compatibility mode and standard mode.
For the example above in IE8 standard mode and FF, Opera it renders:
for IE8 compatibility mode:
As a result when IE8 is in compatibility mode Command row does not fill all grid's width
I tried to set custom render method for command row and set manually Colspan property but it DOES NOT change for Compatibility mode (for FF/IE8standard renders as expected)
Below is code
Thank you
I've stuck with following problem.
I have a grid where I do use SetRenderMethodDelegate method to customize header row (build two-level header), i.e. following:
--------------------------------------------------------
| col1 | col2 |______col3________|_______col4_______|
| | | col3.1 | col3.2 | col4.1 | col4.2 |
--------------------------------------------------------
| | | | | | |
When Command row is visible it is rendered with different collspan count for IE 8 in compatibility mode and standard mode.
For the example above in IE8 standard mode and FF, Opera it renders:
<
tr
class
=
"rgCommandRow"
><
td
class
=
"rgCommandCell"
colspan
=
"6"
>
<
tr
class
=
"rgCommandRow"
><
td
class
=
"rgCommandCell"
colspan
=
"4"
>
As a result when IE8 is in compatibility mode Command row does not fill all grid's width
I tried to set custom render method for command row and set manually Colspan property but it DOES NOT change for Compatibility mode (for FF/IE8standard renders as expected)
Below is code
Private
Sub
weldsGrid_ItemCreated(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridItemEventArgs)
Handles
weldsGrid.ItemCreated
If
e.Item.ItemType = GridItemType.CommandItem
Then
e.Item.SetRenderMethodDelegate(
AddressOf
RenderCommandDelegate)
End
If
'If e.Item.ItemType = GridItemType.Header Then
' e.Item.SetRenderMethodDelegate(AddressOf RenderHeaderDelegate)
'End If
End
Sub
Private
Sub
RenderCommandDelegate(
ByVal
output
As
HtmlTextWriter,
ByVal
container
As
Control)
Dim
cell =
DirectCast
(container.Controls(0), System.Web.UI.WebControls.TableCell)
'IE7 or IE8 in compat mode fix
cell.ColumnSpan = 20
cell.RenderControl(output)
End
Sub
Thank you