CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: TDBGrid-Problem

  1. #1
    Join Date
    May 2001
    Posts
    91

    TDBGrid-Problem

    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
    have a nice day

    Patzer
    _____________________________
    Philo will never be forgotten

  2. #2
    Join Date
    May 2001
    Posts
    91

    Re: TDBGrid-Problem

    I forgot: It doesn't. Any Ideas what to do?

    :-)

    have a nice day,

    Patzer
    have a nice day

    Patzer
    _____________________________
    Philo will never be forgotten

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured