5.25 How do I determine whether a checkbox in my datagrid is checked or not? If the column is a boolean column, you can just cast the object returned by the indexer to a bool and use it. if((bool)dataGridTopics[row, column]) MessageBox.Show("I am true"); else MessageBox.Show("I am false"); 来 源 http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q831q
5.25 How do I determine whether a checkbox in my datagrid is checked or not? If the column is a boolean column, you can just cast the object returned by the indexer to a bool and use it. if((bool)dataGridTopics[row, column]) MessageBox.Show("I am true"); else MessageBox.Show("I am false"); 来 源 http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q831q
"False";datagriboolcolumnstyes 列
可以通过.truevalue,falsevalue 属性
制定当他为"True"或者"False"时的数值
比如一个bool属性
public bool Check
{
get
{
return m_bCheck;
}
}
没有set属性,所以在DataGrid中是灰色的状态,m_bCheck为false当然是没选中状态,为true是选中状态