得到筛选后的新的DataRow;

DataRow[] rows=dt.Select("1=1 and flag <> 1")

清空原DataTable并赋值给新建表

DataTable dtNew=dt.Clone();

把筛选后的结果添加到新建表中

for(int i=0;i<rows.Length;i++)
{
dtNew.ImportRow(rows[i]);
}

相关文章:

  • 2022-03-04
  • 2021-05-31
  • 2021-12-13
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2022-02-22
猜你喜欢
  • 2021-12-04
  • 1970-01-01
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案