DataTable dt = newsBase.GetAllnews(); 
DataRow[] foundRow; 
foundRow = dt.Select("catalogid = 0", ""); 
DataTable newTb = dt.Clone(); 
foreach (DataRow row in foundRow) 

    newTb.Rows.Remove(row); 
}

GridView1.DataSource = newTb ; 
GridView1.DataBind();

本文转载:CSDN博客