Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Column header images
posted

Is there a way to put images in the column header? I'm using this code to do it, but nothing seems to be working.

grid.DisplayLayout.Bands[0].Columns["IconColumn"].Header.Appearance.Image = grid.DisplayLayout.Appearances["Icon"];
grid.DisplayLayout.Bands[0].Columns["IconColumn"].Header.ToolTipText = "Icon Column";
grid..DisplayLayout.Bands[0].Columns["IconColumn"].Header.Appearance.ImageHAlign = Infragistics.Win.HAlign.Left;
grid.DisplayLayout.Bands[0].Columns["IconColumn"].Header.Appearance.TextHAlign = Infragistics.Win.HAlign.Right;

Thanks

  • 469350
    Verified Answer
    Offline posted

     This code doesn't make sense. You are setting the Image property to an Appearance object. I'm surprised this doesn't raise an exception. An Appearance is not an image. You need to suppose an actual Image like a Bitmap. Or else an index into the ImageList connected to the grid.