Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Column header styles are not changeable on a postback
posted

I have a grid inside a warp panel that needs to have the header styles conditionally changed on a postback.  I can do whatever I want with the on the initial page load, but on a postback none of the changes are seen on the client side.  Below is a snippet of code that demonstrates the style settings on a postback.

 

For i As Integer = 0 To myGrid.Columns.Count - 1
With myGrid.Columns(i).Header
.Style.Font.Bold = True
.Style.Font.Size = 8
.Style.ForeColor = Drawing.Color.White
End With
Next

I have also tried to use a css style which also has no effect.