Solved

color a single cell in a listview (vb.net)

Posted on 2011-02-19
8
1,892 Views
Last Modified: 2012-05-11
Hello,

I'm trying to make a listview looking like this:

 Listview individual cell colors
Can someone provide me an example code that can color the individual cells of a listview

grtz

Jeroen
0
Comment
Question by:HertelDra
  • 4
  • 2
  • 2
8 Comments
 
LVL 11

Expert Comment

by:Deepak Lakkad
ID: 34933370
hi

Is it a WinForm application or what?

- Deepak Lakkad
0
 

Author Comment

by:HertelDra
ID: 34933421

yes it is.

0
 
LVL 11

Expert Comment

by:Deepak Lakkad
ID: 34933451
Hi

I think this will not be possible in ListView

My suggestion is use DataGridView if you are binding it with database


- Deepak Lakkad
0
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 34933464
How are you binding ListView ?
- Is it from database (ListView.DataSource = ds) OR
- Creating at runtime ?
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:HertelDra
ID: 34933471
it is created during runtime
0
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 34933650
It seems that not possible in ListView. I tried and research for sometime.
Here is the alternative way...
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_26649866.html?sfQueryTermInfo=1+10+30+background+cell+chang+color+listview
0
 

Accepted Solution

by:
HertelDra earned 0 total points
ID: 34946474
Hey guys thanks for your help.

I've found the solution by setting the "ownerdraw" setting to true.

This is what i have found:
http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.ownerdraw.aspx
0
 

Author Closing Comment

by:HertelDra
ID: 34986550
This was what worked eventually
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now