Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2011-02-19
8
1,920 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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
 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sending an input value from a view to a controller in MVC 3 22
Upgrading my SSIS package in VS 2012 6 59
Add a Condition in ASP Repeater 6 34
Visual studio 2015 1 21
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

840 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