views:

615

answers:

2

I'm having a bit of an unusual problem with an extended version of the ASP.NET GridView control that I am working. It is rendering all of the text applied to it just fine, but is not rendering any the style properties that are set. For example, if I set the AlternatingRowStyle to use a gray background, the gray background is not being rendered. However, if I pass the same data set and property to the vanilla GridView control, the background is rendered correctly.

Any ideas what I might be doing wrong?

A: 

Wild guess: are your styles defined as themes?

Andrew Robinson
I don't think so, I updated the question with how the control is declared.
Rob
A: 

Alright, I'm sure this should have been obvious at first, but after using the class debugging technique of "comment stuff until it starts working" I managed to isolate the issue to being due to having data binding column generation code in RenderContents. Which leads me to believe that I was missing a call in that code, but the code to OnPreRender corrected the issue.

Rob