I used the RowStyle event with the following code:
private void dgvPersonalizadoInterior_RowStyle(object sender, RowStyleEventArgs e)
{
try
{
for (int i = 0; i < dgvPersonalizadoInterior.RowCount; i++)
{
if ((i % 2) == 0)
e.Appearance.BackColor = Color.Red;
else
e.Appearance.BackColor = Color.LightYellow;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
I was looking for information on the subject, but I did not find anything.
Do you have any ideas?