清空dataset中的某行某列的数据

string tempSFZH = "";
foreach (DataRow rs in ds.Tables[0].Rows)
{
     tempSFZH = rs[ht["身份证号码"].ToString()].ToString();
     foreach (DataRow rs1 in ds_stuAll.Tables[0].Rows)
    {
         foreach (DataColumn dc in ds_stuAll.Tables[0].Columns)
          {
                if (dc.ColumnName == "sfzh" && rs1[dc].ToString() == tempSFZH)
                 {
                      rs1["xjh"] = "";
                     rs1["user_xh"] = "";
                 }
           }
     }
}

posted @ 2014-05-19 17:47  樱花飞落ll  阅读(447)  评论(0编辑  收藏  举报