EpiUltraGrid override style

Hi,

Is there a property on the EpiUltraGrid to override cell appearance? I am trying the code below but the cell never is colored. If I click on the scroll bar arrow to do down I can see the next cell change color, then revert back to the grayed read-only cell color.

    Private Sub dgvJobs_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs)
        If Not DBNull.Value.Equals(e.Row.Cells("JobCompletionDate").Value) Then
            If e.Row.Cells("JobCompletionDate").Value > e.Row.Cells("DueDate").Value Then
                e.Row.Cells("JobCompletionDate").Appearance.BackColor = System.Drawing.Color.Red               
            ElseIf e.Row.Cells("JobCompletionDate").Value <= e.Row.Cells("DueDate").Value Then
                e.Row.Cells("JobCompletionDate").Appearance.BackColor = System.Drawing.Color.LightGreen
            End If
        End If
    End Sub


Thanks Scott.

I could have sworn I tried this. What event is triggering your loop?


From: "'Scott A. Litzau' salitzau@... [vantage]" <vantage@yahoogroups.com>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Wednesday, June 11, 2014 4:25 PM
Subject: RE: [Vantage] EpiUltraGrid override style

#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 #ygrps-yiv-1564577999yiv0031792129 --

#ygrps-yiv-1564577999yiv0031792129 .ygrps-yiv-1564577999yiv0031792129ygrp-photo-title{
clear:both;font-size:smaller;height:15px;overflow:hidden;text-align:center;width:75px;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129ygrp-photo{
background-position:center;background-repeat:no-repeat;background-color:white;border:1px solid black;height:62px;width:62px;}

#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129photo-title
a,
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129photo-title a:active,
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129photo-title a:hover,
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129attach-table div.ygrps-yiv-1564577999yiv0031792129attach-row {
clear:both;}

#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129attach-table div.ygrps-yiv-1564577999yiv0031792129attach-row div {
float:left;}

#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p {
clear:both;padding:15px 0 3px 0;overflow:hidden;}

#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129ygrp-file {
width:30px;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129attach-table div.ygrps-yiv-1564577999yiv0031792129attach-row div div a {
text-decoration:none;}

#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129attach-table div.ygrps-yiv-1564577999yiv0031792129attach-row div div span {
font-weight:normal;}

#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129ygrp-file-title {
font-weight:bold;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 #ygrps-yiv-1564577999yiv0031792129

filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Consolas;panose-1:2 11 6 9 2 2 4 3 2 4;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129
#ygrps-yiv-1564577999yiv0031792129 p.ygrps-yiv-1564577999yiv0031792129MsoNormal, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 li.ygrps-yiv-1564577999yiv0031792129MsoNormal, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 a:link, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 span.ygrps-yiv-1564577999yiv0031792129MsoHyperlink
{color:blue;text-decoration:underline;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 a:visited, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 span.ygrps-yiv-1564577999yiv0031792129MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p
{margin-right:0in;margin-left:0in;font-size:12.0pt;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 code
{}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 pre
{margin:0in;margin-bottom:.0001pt;font-size:10.0pt;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 tt
{}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 span.ygrps-yiv-1564577999yiv0031792129HTMLPreformattedChar
{font-family:Consolas;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p.ygrps-yiv-1564577999yiv0031792129attach, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 li.ygrps-yiv-1564577999yiv0031792129attach, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129attach
{margin-right:0in;margin-left:0in;font-size:9.0pt;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p.ygrps-yiv-1564577999yiv0031792129bold, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 li.ygrps-yiv-1564577999yiv0031792129bold, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129bold
{margin-right:0in;margin-left:0in;font-size:10.0pt;font-weight:bold;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p.ygrps-yiv-1564577999yiv0031792129green, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 li.ygrps-yiv-1564577999yiv0031792129green, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129green
{margin-right:0in;margin-left:0in;font-size:12.0pt;color:#628C2A;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p.ygrps-yiv-1564577999yiv0031792129replbq, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 li.ygrps-yiv-1564577999yiv0031792129replbq, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129replbq
{margin:3.0pt;font-size:12.0pt;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p.ygrps-yiv-1564577999yiv0031792129ad, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 li.ygrps-yiv-1564577999yiv0031792129ad, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129ad
{margin-right:0in;margin-left:0in;font-size:12.0pt;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p.ygrps-yiv-1564577999yiv0031792129underline, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 li.ygrps-yiv-1564577999yiv0031792129underline, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129underline
{margin-right:0in;margin-left:0in;font-size:12.0pt;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 span.ygrps-yiv-1564577999yiv0031792129yshortcuts
{}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p.ygrps-yiv-1564577999yiv0031792129ad1, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 li.ygrps-yiv-1564577999yiv0031792129ad1, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129ad1
{margin-right:0in;margin-left:0in;font-size:12.0pt;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p.ygrps-yiv-1564577999yiv0031792129ad2, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 li.ygrps-yiv-1564577999yiv0031792129ad2, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129ad2
{margin-right:0in;margin-bottom:7.5pt;margin-left:0in;font-size:12.0pt;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 p.ygrps-yiv-1564577999yiv0031792129underline1, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 li.ygrps-yiv-1564577999yiv0031792129underline1, #ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129underline1
{margin-right:0in;margin-left:0in;font-size:12.0pt;text-decoration:underline;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 span.ygrps-yiv-1564577999yiv0031792129yshortcuts1
{font-weight:bold;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 span.ygrps-yiv-1564577999yiv0031792129yshortcuts2
{font-weight:normal;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 span.ygrps-yiv-1564577999yiv0031792129EmailStyle34
{color:#1F497D;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 .ygrps-yiv-1564577999yiv0031792129MsoChpDefault
{font-size:10.0pt;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {margin:1.0in 1.0in 1.0in 1.0in;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 div.ygrps-yiv-1564577999yiv0031792129WordSection1
{}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129
filtered #ygrps-yiv-1564577999yiv0031792129 {}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Symbol;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Wingdings;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Wingdings;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Wingdings;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Wingdings;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Wingdings;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Wingdings;}
#ygrps-yiv-1564577999 filtered #ygrps-yiv-1564577999yiv0031792129 {font-family:Wingdings;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 ol
{margin-bottom:0in;}
#ygrps-yiv-1564577999 #ygrps-yiv-1564577999yiv0031792129 ul
{margin-bottom:0in;}
#ygrps-yiv-1564577999



Ted,
 
I have been working on grids for the past couple of weeks and just ran into what you are trying to do. I was able to change the color of a row or individual cell.
 
I am looping through the grid and doing a comparison
 
In C#
 
foreach(UltraGridRow r in grdLaborHrs.Rows)
{
if((decimal)r.Cells[“LaborHed.PayHours”].Value > 12)
                {
                                //CELL (not using)
                                //r.Cells[5].Appearance.BackColor = Color.Red;
 
                                //ROW
                                r.Appearance.BackColor = Color.Red;
                }
}
 
This worked for me.
 
Scott
 
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Monday, June 09, 2014 8:22 AM
To: vantage@yahoogroups.com
Subject: [Vantage] EpiUltraGrid override style
 
 
Hi,

Is there a property on the EpiUltraGrid to override cell appearance? I am trying the code below but the cell never is colored. If I click on the scroll bar arrow to do down I can see the next cell change color, then revert back to the grayed read-only cell color.

    Private Sub dgvJobs_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs)
        If Not DBNull.Value.Equals(e.Row.Cells("JobCompletionDate").Value) Then
            If e.Row.Cells("JobCompletionDate").Value > e.Row.Cells("DueDate").Value Then
                e.Row.Cells("JobCompletionDate").Appearance.BackColor = System.Drawing.Color.Red               
      ;       ElseIf e.Row.Cells("JobCompletionDate").Value <= e.Row.Cells("DueDate").Value Then
                e.Row.Cells("JobCompletionDate").Appearance.BackColor = System.Drawing.Color.LightGreen
            End If
        End If
    End Sub