piDogDataView.DataView.PaintHeaderBackGround

Scope: Public
Event PaintHeaderBackGround(g as Graphics, Column as integer, colLeft as integer, colWidth as integer) As Boolean
Use this event to draw the header background. Return true if you've handled the event.

Example:

//Some fancy custom heading BG painting

Dim start,range As Integer

If Column=Me.SortColumn Then
For i As Integer=g.Height DownTo 0
// A bit of a gradient
g.ForeColor=HSV(0,0,.7-.2*((g.Height-i)/g.Height))
g.Drawline(colLeft,i,colleft+colWidth,i)
Next
// Add a border
g.ForeColor=&c666666
g.DrawRect(colLeft,0,colWidth,g.Height)
Else
g.ForeColor=&caaaaaa
g.FillRect(colLeft,0,colWidth,g.Height)
g.ForeColor=&c888888
g.Drawline(colLeft,0,colLeft,g.Height)
g.Drawline(colLeft,g.Height,colLeft+colWidth,g.Height)
If Column=Me.ColumnCount-1 Then g.DrawLine(colLeft+colWidth-1,0,colLeft+colWidth-1,g.Height)
start=g.Height*.5
range=g.Height-start
For i As Integer=start To g.Height
g.ForeColor=RGB(0,0,0,(g.Height-i)/range*70+185)
g.DrawLine(colLeft,i,colLeft+colWidth,i)
Next
End If

Return true