DataGridView
I have a DataGridView in which i have added a DataGridViewButtonColumn.How can we change the color of the button in that column.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
guru koolPosted Jan 14, 2009, 12:14 AM
Niradhip ChakrabortyPosted Jan 13, 2009, 5:04 PM
Take following code as reference.(dgv is the DataGridView control name)
DataGridViewButtonColumn buttonCol = new DataGridViewButtonColumn();
buttonCol.Name = "ID";
buttonCol.CellTemplate.Style.ForeColor = Color.FromArgb(255, 0, 0);
dgv.Columns.Add(buttonCol);