I know how to add a solid background color to each, cell, row, column etc. but I do not know how to add a gradient brush to each row individualy.
I need to fill the datagridview with values, the datagridview is disconnected from any database or other data source. After filling the datagridview, I want to step trough each row, find my key values, decide the gradient colors and then add the gradient to the row.
I like to do something similar to what I now do with a background color:
Expand|Select|Wrap|Line Numbers
- For Each R As DataGridViewRow In DGV.Rows
- Dim CS As New DataGridViewCellStyle
- Select Case i
- Case 1 : CS.BackColor = Color.Yellow
- Case 2 : CS.BackColor = Color.Blue
- End Select
- R.DefaultCellStyle = CS
- Next
I am using VB.NET and VS 2008 and 2010
Peter Schwennesen