Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGridView - Color of Editing Row

Status
Not open for further replies.

eb24

Programmer
Dec 17, 2003
240
US
In my DataGridView, I would like the whole row to be of a unique color when the user is editing a cell on that row. I was thinking something like this:
Code:
private void dgv_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
     dgv.CurrentRow ???
     ??? SelectionBackColor = Color.Red;
}
 
think you would do it like..
Code:
private void Grid_CellFormatting(object sender,  

      DataGridViewCellFormattingEventArgs e)

{
   e.CellStyle.SelectionForeColor = Color.Red;

}

Not tested but give it a try?

Age is a consequence of experience
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top