Changing button background color for one row in datagrid

Jun 25 2010 12:47 PM
I have the below code that loops through a datagrid setting the format per the items listed in that row. For some reason I cant find how to change the button background color for just one button (some buttons will be red and some will be green). Can someone point me in the correct location?

 dataGridTicketSearch.Rows[dgvr.Index].DefaultCellStyle.Font = new Font("Arial", 12);
dataGridTicketSearch.Rows[dgvr.Index].DefaultCellStyle.ForeColor = Color.Black;
dataGridTicketSearch.Rows[dgvr.Index].Cells["colAction"].Value = "Redeem";
dataGridTicketSearch.Rows[dgvr.Index].Cells["colAction"].Style.BackColor = Color.Green;


Answers (2)