Print Page | Close Window

Switch background color row

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=14509
Printed Date: 15 November 2024 at 2:39am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Switch background color row
Posted By: MrPeter
Subject: Switch background color row
Date Posted: 11 June 2009 at 8:51am
Hello all.
 
Is it possible to set a background color for a row that is turned on/off every row ?
Example: first row has BGcolor blue, next row has white, next row has blue, next row white, ...
 
I can set this while loading up data, but when i sort through the column titles then the records are mixed up and i get a wrong result.
 
So does the report control support this kind of BGcolor switching ?
 
Thanks in advance for any help



Replies:
Posted By: Aaron
Date Posted: 11 June 2009 at 1:46pm
Hi,
 
You can use BeforeDrawRow event for this:
 
Private Sub wndReportControlMerchants_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)
        If (Row.Index Mod 2 = 0) Then
            Metrics.BackColor = RGB(225, 225, 225)
        End If
End Sub
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net