Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2024
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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