Change and Save the Row Color of the DataGridView

2

I want to change the color of the DataGridView line and up to you.

Code:

private void btnativo_Click(object sender, EventArgs e)
{
    MudarCor();
}

public void MudarCor()
{
    dgvIngrediente.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
    dgvIngrediente.CurrentRow.DefaultCellStyle.BackColor = Color.Yellow;
}
}
}

But when I close my form and open it again, the DataGridView lines return with the normal color, not the one I changed. I would like to know how I do it to save color and make it permanent.

    
asked by anonymous 08.10.2016 / 23:49

0 answers