1. //
  2. // set grid lines color
  3. //
  4. listView.ColorGridLines = Color.Blue;
  5.  
  6. //
  7. // handle the drawing event to do our custom drawing
  8. // alternatively, we can override OnDrawBackround in our custom control derived from BetterListView
  9. //
  10. listView.DrawColumnHeaderBackground += ListViewOnDrawColumnHeaderBackground;
  11.  
  12. ...
  13.  
  14. void ListViewOnDrawColumnHeaderBackground(object sender, BetterListViewDrawColumnHeaderBackgroundEventArgs eventArgs)
  15. {
  16. // fill background of the whole column header
  17. eventArgs.Graphics.FillRectangle(Brushes.Yellow, eventArgs.ColumnHeaderBounds.BoundsOuter);
  18.  
  19. // fill background just behind the text area
  20. eventArgs.Graphics.FillRectangle(Brushes.YellowGreen, eventArgs.ColumnHeaderBounds.BoundsText);
  21. }
  22.