Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Different highlight colors for different rows in a datatgridview

$
0
0
I have a datagridview on my form. The rows have different fore colors based on different criteria. For example in a product datagridview: If the product is disabled the fore color is gray. If the product is on back order it is red. If the products is available it is black. When I  select a row in the datagridview it highlights that row with the back color in green and the fore color in black. I want the back color to be highlighted green, but I want the fore color to be stay the color it was before it was selected- either gray, red or black. Is there a way to do this?

Debra has a question


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>