ListView and Cell Colors


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Glad it worked for you too.

Edhy Rijo

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
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.



Thanks, Edhy!

Bill
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Bill,

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.





Private Sub lstContacts_RowPopulating(ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.RowPopulatingEventArgs) Handles lstContacts.RowPopulating

Dim bo As bizContacts = DirectCast(e.BusinessObject, bizContacts)



e.UseGroup = True



'-- Show the Inactive Status with a friendly text

If bo.RequestServiceAuthorized Then

e.GroupHeaderText = "Request Service Authorized"

e.RowForeColor = Color.Green

Else

e.GroupHeaderText = "Non-Authorized"

End If



'-- If inactive, set the forecolor red.

If bo.ContactIsInactive = True Then

e.RowForeColor = Color.Red

End If

End Sub



Edhy Rijo

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
I searched these forums but could not find an answer...it has probably been covered already, so I apologize for the duplicate question.



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?



Thanks,

Bill
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search