I need to change the color of the cell:
I'm doing it this way
dataGridView.Rows[rowIndex].Cells["nomeDaColuna"].Style.BackColor = Color.Yellow;
But I can not get past the rowIndex I would have to pass the "line name"
I need to change the color of the cell:
I'm doing it this way
dataGridView.Rows[rowIndex].Cells["nomeDaColuna"].Style.BackColor = Color.Yellow;
But I can not get past the rowIndex I would have to pass the "line name"
So, there are no names for the grids lines in DataGridView as far as I know, but you can create a dictionary for this, work, so I think it's best to think what you want to achieve in the end before and plan a little.
dataGridView.Rows[0].HeaderCell.Value = "NomeDaLinha1";
dataGridView.Rows["NomeDaLinha1"].DefaultCellStyle.BackColor = Color.Yellow;
It would be something like this, but you would have to specify the names of each line.
Warning: The above code has not been tested.