DataGridView
I have a DataGridView in which i have added a DataGridViewButtonColumn.How can we change the color of the button in that column.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Jan 13, 2009, 12:04 PM EST
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);
guru kool14 reputationPosted Jan 13, 2009, 7:14 PM EST