foreach (DataRowView drv in dttestGroups.DefaultView)
{
foreach (DataRow rowSec in ud.m_UsertestGroupsTable.Rows)
{
{
if( (bool)rowSec["ColumnName"] == true)
// or if((bool)rowSec[columnIndex] == true)
{
//do something.
}
}
}
}
Notes:
- You have to know the the column is of type
bool
. otherwise it will throw an exception. - You can't set the same column's value to a string.