I'm currently using a GridDataBoundGrid Control to display some information.
I'm using the PrepareViewStyleInfo event (as mentioned in a previous forum posting) to replace one of the columns data with an image from an image list if the value is 1.
Now I'd like to make sure that the column header for that column displays the icon. (Much like the attachment and flag columns in Outlook)
What's the quickest/easiest way to do this?
ADAdministrator Syncfusion Team April 30, 2003 03:05 AM
I think you can use the same technique as other cells in the column with a couple of additional changes.
You can identify the column header in PrepareViewStyleInfo by checking for e.RowIndex == 0. So, if it is the particular header you are looking for, in addition to setting the image stuff, also set e.Style.CellType = "Static" and e.Style.CellAppearance = GridCellAppearance.Raised;
The raised part is what gives the cell the 3d header look. You can set this to Flat if you don't wnat this.
PHPaul HealApril 30, 2003 04:03 AM
Worked like a charm.
I was missing the setting of the cell type.