T
Tom Castiglia
I am inheriting from the GridView and I noticed the GridView ALWAYS emits its
table tag with a style attribute containing "border-collapse: collapse". I
have tried everything that I can think of to remove this style, but without
results.
I have tried the following:
Attributes.CssStyle.Remove(HtmlTextWriterStyle.BorderCollapse);
Attributes.CssStyle.Clear()
I have attempted this from the RenderContents(), OnInit(), and OnPreRender()
methods. The problem is that even in the RenderContents() method, the
Attributes.CssStyle.Count properties is 0. So it seems that the
Border-Collapse style is not added until a later point in the control's
lifecycle.
Any thoughts on this? It seems to be really improper for the Gridview to
inject this style into HTML. I really need to control the control's style
through a CssClass.
table tag with a style attribute containing "border-collapse: collapse". I
have tried everything that I can think of to remove this style, but without
results.
I have tried the following:
Attributes.CssStyle.Remove(HtmlTextWriterStyle.BorderCollapse);
Attributes.CssStyle.Clear()
I have attempted this from the RenderContents(), OnInit(), and OnPreRender()
methods. The problem is that even in the RenderContents() method, the
Attributes.CssStyle.Count properties is 0. So it seems that the
Border-Collapse style is not added until a later point in the control's
lifecycle.
Any thoughts on this? It seems to be really improper for the Gridview to
inject this style into HTML. I really need to control the control's style
through a CssClass.