2014-10-03 如何篩選DataTable資料 843 0 ASP.NET 摘要:如何篩選DataTable資料 DataView dv = new DataView(dt); dv.RowFilter = "nodeid = 1"; //放篩選條件 foreach (DataRowView drv in dv) //記住這邊是DataRowView 後面是 dv { Console.WriteLine(drv[0].ToString()); } 回首頁