How can i set checked and uncheck checkbox column in Gridvie
How can i set checked and uncheck checkbox column in DataGridview.

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.
Khargesh RajputPosted Mar 31, 2015, 12:52 AM
{
foreach (DataGridViewRow row in dataGridView1.Rows)
{
DataGridViewCheckBoxCell chk = (DataGridViewCheckBoxCell)row.Cells[1];
// set cell index of your checkbox position in datagrid
if (chk.Value == chk.TrueValue)
{
chk.Value = chk.FalseValue;
}
else
{
chk.Value = chk.TrueValue;
}
}
}
Feroz KhanPosted Mar 31, 2015, 9:00 AM
Column added but checked mark is not showing you know like right mark and unmark..
like checked and unchecked.... and data is coming from database i dont want to put in code manually... just checked and unchecked is not showing..
Khargesh RajputPosted Mar 31, 2015, 6:53 AM
http://www.c-sharpcorner.com/UploadFile/deveshomar/adding-checkbox-column-in-datagridview-in-C-Sharp-window-forms/
Feroz KhanPosted Mar 31, 2015, 6:48 AM
ok
how can i add checkbox column in datagridview...
Feroz KhanPosted Mar 29, 2015, 2:41 PM
Afzaal Ahmad ZeeshanPosted Mar 29, 2015, 2:06 PM
checkBox.Checked = true;
Read this MSDN guide for more.