How to Include Icon in the Column Header in Windows Forms Grid Control
18 Nov 20181 minute to read
The GridControl will allow you to place images in cells by specifying style.ImageIndex and style.ImageList value for the cell, provided style.CellType is either “Static” or “Text Box”. So, to make your header cell hold an icon, make it “Static” and set the following properties.
//GridControl.
this.gridControl1[0,3].CellType = "Static";
this.gridControl1[0,3].CellAppearance = GridCellAppearance.Raised;
this.gridControl1[0,3].ImageList = this.imageList1;
this.gridControl1[0,3].ImageIndex = 1;'GridControl.
Me.gridControl1(0,3).CellType = "Static"
Me.gridControl1(0,3).CellAppearance = GridCellAppearance.Raised
Me.gridControl1(0,3).ImageList = imageList
Me.gridControl1(0,3).ImageIndex = 1