I have One DatagridView.
I need to highlights rows which belongs to "ID"
For Example
ID
1
1
1
1
2
2
2
3
That's it.
I need to highlights ID-1 all rows to Yellow Color
Then 2 to Lime Color.
And 3 to Yellow Again.
Here is my Code But Not working. Any Help will be really appreciated.
For i As Integer = 0 To dgvvoucher.Rows.Count - 1
For j As Integer = 0 To dgvvoucher.Rows.Count - 1
If dgvvoucher.Item(0, i).Value = dgvvoucher.Item(0, i).Value Then
dgvvoucher.Rows(i).DefaultCellStyle.BackColor = Color.Yellow
Else
dgvvoucher.Rows(i).DefaultCellStyle.BackColor = Color.Lime
End If
Next
Next
zabayin 0 Newbie Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
zabayin 0 Newbie Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
zabayin 0 Newbie Poster
zabayin 0 Newbie Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
zabayin 0 Newbie Poster
zabayin 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.