PC Review


Reply
Thread Tools Rate Thread

datagridview row background color based on column value in data va

 
 
=?Utf-8?B?R3JlZyBMYXJzZW4=?=
Guest
Posts: n/a
 
      27th Dec 2006
I'm populating a datagridview from a data table. I would like to set the
back ground color of each row based on a column value in that row. If the
value of a column for a particular row is set to 1, then the color of the row
is red, 2 color of the row is green, 3 color yellow, etc. How would I go
about doing this.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?R3JlZyBMYXJzZW4=?=
Guest
Posts: n/a
 
      27th Dec 2006
Ok, I have solved this by using the DataGridView PaintEventHandler



"Greg Larsen" wrote:

> I'm populating a datagridview from a data table. I would like to set the
> back ground color of each row based on a column value in that row. If the
> value of a column for a particular row is set to 1, then the color of the row
> is red, 2 color of the row is green, 3 color yellow, etc. How would I go
> about doing this.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change background color based on value in column A JT Innovations Microsoft Excel Misc 4 23rd Jan 2009 07:14 PM
change background color of cell as data in column changes S Himmelrich Microsoft Excel Programming 1 14th Jan 2008 09:38 PM
Datagridview background color ??? =?Utf-8?B?Y2FsZGVyYXJh?= Microsoft Dot NET 0 1st Oct 2007 03:19 PM
DataGridView row background color =?Utf-8?B?bWFydGluMQ==?= Microsoft VB .NET 6 28th Jun 2006 05:33 PM
Changing Background Color Based on Record Data in a Continuous Form Eduardo Leaderez Microsoft Access Form Coding 1 28th Apr 2004 12:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:49 AM.