如何使用Datarow
根据列名检索数据?我正在尝试从我的第一次循环中循环数据库数据
//Trying to get data
DataRow dr = dsResult.Tables[1].Rows[0];
//trying to get data successful
//what i trying to achieve is to retrieve data from database based on rows index and
column name
for(int i =0; i <datagridview.Rows.Count ; i++){
string a = dr['ColumnName'].['RowsIndex'].toString(); //Failed
}