Can I do something like this:
<asp:BoundField DataField="Field1"
HeaderText='<% IF(Eval("Field2").ToString().SubString(3,4).Equals("Text3"),"Text1","Text2") %>'
SortExpression="Field1" />
With the goal of having the header of Field1 be Text1 when the 4th-7th characters of Field2 = Text3 and Text2 otherwise?
I tried it and it just put "'<% IF(Eval("Field2").ToString().SubString(3,4).Equals("Text3"),"Text1","Text2") %>'" as the actual header string!
Thanks in advance!