Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created checkbox to datagridview column dynamically. Now i want fill that checkbox with color. Can i know how to fill it.
Posted
Updated 2-Jan-11 23:01pm
v2

1 solution

Hi,

I think you are working in windows application so refer the following code....

Here dgvGrid1 --> DataGridView Control.

DataGridViewCheckBoxColumn dgvChkbx = new DataGridViewCheckBoxColumn();
dgvChkbx.DefaultCellStyle.BackColor = Color.Red;
dgvChkbx.DefaultCellStyle.SelectionBackColor = Color.Green;
dgvGrid1.Columns.Add(dgvChkbx);



Cheers :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900