G
Guest
I want an image and text in the column header in my GridView. Does anyone
know how to do that? Thanks.
know how to do that? Thanks.
Vaibhav said:I think , I did something like that.
Another way you can do it, from the code behind
System.Web.UI.WebControls.Image imgControl=new
System.Web.UI.WebControls.Image();
imgControl.ImageUrl="images/xyz.gif";
if(e.Item.ItemType==ListItemType.Header)
{
e.Item.Cells[0].Controls.Add(imgControl);
}
lanem said:That doesn't work. You can't put HTML code in there.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.