469,923 Members | 1,856 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,923 developers. It's quick & easy.

Datagridview Conditional Formatting in .Net 2005

Hi all,

I am using a datagridview in .Net 2005 to display data from a stored
procedure using a System.Data.SQLClient connection. After the stored
procedure dumps the data into a dataset and the datagridview is displayed I
need to conditionally format the backcolors of the rows (this will be
controlled by the value of a cell that contains a checkbox from the SQL
table). How do I change the row backcolor if the cell's check box is checked
on any given row (and there are many rows) - the row backcolor needs to be
changed to red, otherwise the row backcolor should be displayed as white.

I have tried several different pieces of code without any luck. Any help
would be appreciated. Thanks!
Mar 16 '06 #1
1 11170
jbehrne wrote:
Hi all,

I am using a datagridview in .Net 2005 to display data from a stored
procedure using a System.Data.SQLClient connection. After the stored
procedure dumps the data into a dataset and the datagridview is displayed I
need to conditionally format the backcolors of the rows (this will be
controlled by the value of a cell that contains a checkbox from the SQL
table). How do I change the row backcolor if the cell's check box is checked
on any given row (and there are many rows) - the row backcolor needs to be
changed to red, otherwise the row backcolor should be displayed as white.

I have tried several different pieces of code without any luck. Any help
would be appreciated. Thanks!

http://msdn2.microsoft.com/en-us/library/z1cc356h.aspx

This should give you the information you are looking for.

Chris
Mar 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Bradley | last post: by
8 posts views Thread by Dimitri Furman | last post: by
2 posts views Thread by Von Bailey | last post: by
3 posts views Thread by DS | last post: by
2 posts views Thread by ScottL | last post: by
2 posts views Thread by Filips Benoit | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.