Hi,
Thank you for posting!
Based on my understanding, the question is: how to prevent the GridView
from encoding HeaderText property. If there's anything I misunderstood,
please feel free to post here.
Well, while we cannot prevent GridView from encoding the HeaderText
property, we can decode it back after the DataBinding is complete. We can
do this in the DataBound event:
protected void CustomersGridView_DataBound(object sender, EventArgs e)
{
foreach (TableCell c in CustomersGridView.HeaderRow.Cells)
{
c.Text = HttpUtility.HtmlDecode(c.Text);
}
}
If there is any unclear/you have any more concerns, please feel free to
reply here. I am glad to work with you on it.
Thanks.
Regards,
Walter Wang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.