Hello,
I want to change the background color of a row if the progress is 100%.
Foreground color is changeable background color not.
What am I doing wrong?
regards
Frank
Private Sub rGanttProjekteliste_TextViewCellFormatting(sender As Object, e As GanttViewTextViewCellFormattingEventArgs) _
Handles rGanttProjekteliste.TextViewCellFormatting
'
Dim headercelltyp As Type = GetType(GanttViewTextViewHeaderCellElement)
Dim elementcelltyp As Type = e.CellElement.GetType()
'
If Not headercelltyp.IsAssignableFrom(elementcelltyp) Then
'
If e.Item.Level = 1 Then
e.CellElement.Font = New Font(e.CellElement.Font, FontStyle.Bold)
End If
'
If e.Item.Progress = 100 Then
e.CellElement.BackColor = Color.Gray
Else
e.CellElement.BackColor = Color.White
End If
'
End If
'
End Sub
I want to change the background color of a row if the progress is 100%.
Foreground color is changeable background color not.
What am I doing wrong?
regards
Frank
Private Sub rGanttProjekteliste_TextViewCellFormatting(sender As Object, e As GanttViewTextViewCellFormattingEventArgs) _
Handles rGanttProjekteliste.TextViewCellFormatting
'
Dim headercelltyp As Type = GetType(GanttViewTextViewHeaderCellElement)
Dim elementcelltyp As Type = e.CellElement.GetType()
'
If Not headercelltyp.IsAssignableFrom(elementcelltyp) Then
'
If e.Item.Level = 1 Then
e.CellElement.Font = New Font(e.CellElement.Font, FontStyle.Bold)
End If
'
If e.Item.Progress = 100 Then
e.CellElement.BackColor = Color.Gray
Else
e.CellElement.BackColor = Color.White
End If
'
End If
'
End Sub