Hm, I didn't find this. Although I guess it must be possible by using the
Paint-event of the DataGrid.
I used this function to write something to some row-headers. I guess the
same must be possible with the column-headers:
Private Sub dbgFolder_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles dbgFolder.Paint
Dim row As Integer
row = TopRow()
Dim yDelta As Integer
If row >= 0 Then
yDelta = (dbgFolder.GetCellBounds(row, 0).Height + 1)
Dim y As Integer
y = (dbgFolder.GetCellBounds(row, 0).Top + 2)
Dim cm As CurrencyManager
cm = CType(Me.BindingContext(dbgFolder.DataSource,
dbgFolder.DataMember), CurrencyManager)
Dim dtvGrid As DataView
dtvGrid = New DataView(dtblGrid)
'5 omdat em anders de onderste telkens ni tekende...
Do While ((y < (dbgFolder.Height - yDelta + 3)) AndAlso (row <
cm.Count))
'get & draw the header text...
If DateDiff(DateInterval.Hour,
dtvGrid.Item(row).Item("DateFile"), Now) <= 12 Then
Dim text1 As String
' text1 = System.String.Format("row{0}", row)
text1 = System.String.Format("N", row)
e.Graphics.DrawString(text1, dbgFolder.Font, New
SolidBrush(Color.Black), 4, y)
End If
y = (y + yDelta)
row = (row + 1)
Loop
End If
End Sub
Or maybe override the Paint-event of the cell (I guess that's better, hehe),
and than use
g.FillRectangle(e.BackBrush, bounds)
But to be hon,nest I'm not really an expert of these things. I did some
stuff in it to extend the datagrid, but that's all
Hope this helps,
Pieter