• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2068
  • Last Modified:

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

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
HertelDra
Asked:
HertelDra
  • 4
  • 2
  • 2
1 Solution
 
Deepak LakkadCommented:
hi

Is it a WinForm application or what?

- Deepak Lakkad
0
 
HertelDraAuthor Commented:

yes it is.

0
 
Deepak LakkadCommented:
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Rajkumar GsSoftware EngineerCommented:
How are you binding ListView ?
- Is it from database (ListView.DataSource = ds) OR
- Creating at runtime ?
0
 
HertelDraAuthor Commented:
it is created during runtime
0
 
Rajkumar GsSoftware EngineerCommented:
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
 
HertelDraAuthor Commented:
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
 
HertelDraAuthor Commented:
This was what worked eventually
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now