foreach (DataRow rowSec in ud.m_UsertestGroupsTable.Rows) { if( (bool)rowSec["ColumnName"] == true) // or if((bool)rowSec[columnIndex] == true) { //do something. }
I suggest you Please not use index, prefer to Column Name
foreach(DataRow drow in dt.Rows) { string value = drow[columnname].ToString(); }
No comments:
Post a Comment