1 Attachment(s)
[RESOLVED] Customizing my DataGridViewer - Question
I have a normal DGV on my form.
To make this more readable I want to custom color the rows. 1 row blue, 1 row white, ex...
I attached an image to show what I want to do. The smaller dgv in the picture is what i want to achieve.
Can anyone help me?
Attachment 78680
Re: Customizing my DataGridViewer - Question
Hi there, I think this should work.
vb Code:
Dim i As Integer
For i = 0 To dgvMembersInfo.RowCount
If i > dgvMembersInfo.RowCount Then
Exit For
End If
dgvMembersInfo.Rows(i).DefaultCellStyle.BackColor = Color.Aqua
i += 2
Next
But then again I might be wrong.
Re: Customizing my DataGridViewer - Question
use the AlternatingRowsDefaultCellStyle property of the dgv
Re: Customizing my DataGridViewer - Question
Wow, I didnt realise you could do that...