beforedrawrow setting backcolor |
Post Reply |
Author | |
xfsriddler
Groupie Joined: 22 February 2010 Location: United States Status: Offline Points: 16 |
Post Options
Thanks(0)
Posted: 18 January 2013 at 11:32am |
I have setup the BeforeDrawRow event to color a column's backcolor differently
depending on it's value. This seems to work perfectly except the very first data row (not the heading row) is not being colored , it is staying the default color. Can you direct me to what I am doing wrong ? Private Sub prodgrid_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics) Select Case Item.Index Case 5 If Item.Value > 0 Then Metrics.BackColor = &H9FFBA9 Else Metrics.BackColor = &H9D9DFF End If Case Else Metrics.BackColor = "-1" End Select End Sub |
|
xfsriddler
Groupie Joined: 22 February 2010 Location: United States Status: Offline Points: 16 |
Post Options
Thanks(0)
|
Anyone have any ideas on this one, it's really annoying, the top
data row (not heading) on all my reportcontrols does not change color when I set it , every other row works fine.
|
|
bryanu
Groupie Joined: 19 February 2007 Status: Offline Points: 20 |
Post Options
Thanks(0)
|
Without seeing more of your code, it looks like the issue is with your comparative:
If Item.Value > 0 Then ... You are not changing the color of the item with a value of 0. Try: If Item.Value >= 0 Then |
|
Suite Pro v16.3.1
Visual Basic 6.0 ENT sp6 Windows 8.1 |
|
xfsriddler
Groupie Joined: 22 February 2010 Location: United States Status: Offline Points: 16 |
Post Options
Thanks(0)
|
It is an IF/Then statement, it is supposed to one color if it's greater than 0
and one color if it's not zero or less.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |