StrataFrame Forum
Back
Login
Login
Home
»
Updates and Information
»
StrataFrame Users Contributed Samples
»
color / listview
color / listview
Post Reply
Like
2
color / listview
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Mimouni Mohamed
Mimouni Mohamed
posted 11 Years Ago
ANSWER
Topic Details
Share Topic
Group: StrataFrame Users
Posts: 0,
Visits: 50
Hello,
How to display
a color in the
second column of a
listview
in
the event
RowPopulating
cordially
Mohamed
Mimouni
Reply
Like
2
StrataFrame Team
S
StrataFrame Team
posted 11 Years Ago
ANSWER
Post Details
Share Post
S
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
The MicroFour.StrataFrame.UI.Windows.Forms.ListView does not support changing the background color of a single column by default. We use standard System.Windows.Forms.ListViewItems for that list view, and the only way to change the background color on a column would be to implement OWNER_DRAW on the list view, which is a very involved process.
The MicroFour.StrataFrame.UI.Windows.Forms.StrataListView DOES support background colors on each of the individual sub-items (cells) in the list view. It does not, however, have the same ListPopulationSettings as the standard ListView, so you would need to populate the list with the StrataListViewItems manually. While you are building the list, you would set the background color on the column like this:
if (condition)
{
strataListItem.SubItems[3].BackgroundColor = Color.Red;
}
Reply
Like
3
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
2
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search