标签:new oda source ++ clone copyto length list 数据
方法一:
Datatable dt=new Datatable();
//添加列和数据(代码省略)
DataRow[] drs = dt.Select("DeviceID=‘123‘");
_dt = drs.CopyToDataTable();
dgvList.DataSource = _dt;
方法二:
DataRow[] dr = dt.Select("DeviceID=‘"+DeviceID+"‘");
DataTable d = dt.Clone();
for (int i=0;i<dr.Length;i++)
{
d.ImportRow(dr[i]);
}
标签:new oda source ++ clone copyto length list 数据
原文地址:https://www.cnblogs.com/innershare/p/10996931.html