﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » ListView and Cell Colors</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 04 Apr 2026 07:01:16 GMT</lastBuildDate><ttl>20</ttl><item><title>ListView and Cell Colors</title><link>http://forum.strataframe.net/FindPost22858.aspx</link><description>I searched these forums but could not find an answer...it has probably been covered already, so I apologize for the duplicate question.&lt;br&gt;
&lt;br&gt;
My ListView shows a due date for a packing list item.  I would like the due date to appear red in the ListView if the due date is before the ship date on the packing list.  How do I isolate the  cell in order to make the foreground color set to red?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Bill</description><pubDate>Wed, 22 Apr 2009 15:33:54 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: ListView and Cell Colors</title><link>http://forum.strataframe.net/FindPost22861.aspx</link><description>Glad it worked for you too.</description><pubDate>Wed, 22 Apr 2009 15:33:54 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: ListView and Cell Colors</title><link>http://forum.strataframe.net/FindPost22860.aspx</link><description>Ok...I can get the whole row to work.  Too bad a cell cannot be singled out.  One day, when I have a little extra time, I will replace that ListView with the EnhancedListView.  That'll give me what I am looking for, I'm sure.&lt;br&gt;
&lt;br&gt;
Thanks, Edhy!&lt;br&gt;
Bill</description><pubDate>Wed, 22 Apr 2009 14:58:35 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: ListView and Cell Colors</title><link>http://forum.strataframe.net/FindPost22859.aspx</link><description>Hi Bill,&lt;br&gt;
I don't think the ListView supports that.  What you can do is handle the condition in the ListView.RowPopulating() event and change the color of the whole row or add/change an icon in that row.&lt;br&gt;
&lt;br&gt;
[code][codesnippet][p]&lt;br&gt;
    Private Sub lstContacts_RowPopulating(ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.RowPopulatingEventArgs) Handles lstContacts.RowPopulating&lt;br&gt;
        Dim bo As bizContacts = DirectCast(e.BusinessObject, bizContacts)&lt;br&gt;
&lt;br&gt;
        e.UseGroup = True&lt;br&gt;
&lt;br&gt;
        '-- Show the Inactive Status with a friendly text&lt;br&gt;
        If bo.RequestServiceAuthorized Then&lt;br&gt;
            e.GroupHeaderText = "Request Service Authorized"&lt;br&gt;
            e.RowForeColor = Color.Green&lt;br&gt;
        Else&lt;br&gt;
            e.GroupHeaderText = "Non-Authorized"&lt;br&gt;
        End If&lt;br&gt;
&lt;br&gt;
        '-- If inactive, set the forecolor red.&lt;br&gt;
        If bo.ContactIsInactive = True Then&lt;br&gt;
            e.RowForeColor = Color.Red&lt;br&gt;
        End If&lt;br&gt;
    End Sub&lt;br&gt;
[/p][/codesnippet][/code]</description><pubDate>Wed, 22 Apr 2009 14:22:06 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>