Click to See Complete Forum and Search --> : TDBGrid-Problem


Patzer
August 27th, 2001, 03:16 AM
Hi out there,
I'm working with the TDBGrid, and need to mark a column when some conditions are fulfilled. To use the fetchrowstyle event is impossible, but I thought the following proc might work

Private Sub formatrows()
Dim blnisnullvalue As Boolean
Dim bkaktrow

Dim stblue As New TrueOleDBGrid60.Style
stblue.BackColor = vbBlue
stblue.ForeColor = vbWhite

Me.TDBGridProdukt.AddCellStyle dbgCurrentCell, stblue

With Me.TDBGridProdukt
If Not (.EOF And .BOF) Then
.MoveFirst
End If
While Not .EOF
bkaktrow = Me.TDBGridProdukt.Bookmark
blnisnullvalue = checknull() ' conditioncheck
If blnisnullvalue = True Then
Me.TDBGridProdukt.Columns("Modul").Style = stblue
Else

End If
' Debug.Print Me.TDBGridProdukt.Columns("Modul").Text & " " & blnisnullvalue
.MoveNext
Wend
End With

End Sub


have a nice day,

Patzer

Patzer
August 27th, 2001, 03:17 AM
I forgot: It doesn't. Any Ideas what to do?

:-)

have a nice day,

Patzer