S
S
Sergey2019-03-07 19:48:58
.NET
Sergey, 2019-03-07 19:48:58

VB.NET How to do conditional formatting?

Help to implement "conditional formatting" in a DataGridView element on vb .NET
In one of the columns of a DataGridView, I need to change the background color of the cells from white to red based on the values ​​in the cells. The maximum is red, the minimum is white.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2019-03-08
@Maasik

Thank you for your input, finally got it.
RGB colors look like this: white [255,255,255], red [255,0,0].
For a smooth transition, you must simultaneously change G and B (and G=B) in the range 0-255, in proportion to the values ​​in the cells.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question