20191017_datatable.select() 数据源中没有dataRow

filterStr =" 记录时间 >= '2019/10/17 00:00:00' and 记录时间 <='2019/10/20 23:59:59' "
代码:
dgv.DataSource = dt.Select(filterStr).CopyToDataTable();
修改为:
DataRow[] drs = dt.Select(filterStr);
DataTable newDt = dt.Clone(); //克隆结构
drs.ToList<DataRow>().ForEach((r)=> newDt.ImportRow(r) );
dgv.DataSource = newDt;
不知道为什么, 看 datatable.select() 源码没有看懂 . . .
浙公网安备 33010602011771号