Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
dataGridView1.Rows[0].Cells[0].Style.BackColor = Color.BurlyWood;
dataGridView1.Columns[0].DefaultCellStyle.BackColor = Color.BurlyWood;
dataGridView1.Rows[1].DefaultCellStyle.BackColor = Color.Yellow;
public static void highlightRange(DataGridView dR, System.Drawing.Point p1, System.Drawing.Point p2, System.Drawing.Color colr)
{
//reset to white
foreach (DataGridViewRow drw in dR.Rows)
{
foreach (DataGridViewCell drc in drw.Cells)
{
drc.Style.BackColor = System.Drawing.Color.White;
}
}
//highlight desired range
for (int i = p1.Y; i <= p2.Y; i++)
{
for (int n = p1.X; n <= p2.X; n++)
{
dR.Rows[i].Cells[n].Style.BackColor = colr;
}
}
}