Is it possible to have a text and an image in the header
of the DataGrid web control? I need to show the column
name and the order the table is sorted by (down or up
arrow). I was able to make the DataGrid be switched from
ascending to descending and back by clicking on the column
header but I can put only text or image there.
Any help is greatly appreciated.
If
e.Item.ItemType = ListItemType.Header ThenI should also mention that as an alternative you could also likely solve your problem by using datagrid templates. Here's more info on that technique:
--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Steve C. Orr, MCSD" <st...@orr.net> wrote in message news:#STYNTxwCHA.1096@TK2MSFTNGP10...You can modify the HTML for the header cells in the ItemCreated event of the datagrid.That way you can put whatever you want in there.You should be able to use a line of code similar to this in there:e.Item.Cells(4).Text = "some text for column 4<img src='myimage.gif'>"Here's more info: