我想用Linq 查询 DataSet里面的一个DataTable 根据条件返回一个 datatable  然后将一个gridview 绑定到新的datatable
我的代码:
public partial class Default2 : System.Web.UI.Page
{
    DataSet ds = new DataSet();
    DataTable dt = new DataTable();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bind();
        }
    }
    protected void bind()
    {
        string str = "Data Source=fuhongxia;Initial Catalog=wuyeDataBase;Persist Security Info=True;User ID=sa;Password=123";
        SqlConnection conn = new SqlConnection(str);
        SqlDataAdapter da = new SqlDataAdapter("select * from house_person", conn);
       
        da.Fill(ds, "house");
        dt = ds.Tables["house"].Copy();
        this.GridView1.DataSource = dt;
        this.GridView1.DataKeyNames = new string[] { "HouseId" };
        this.GridView1.DataBind();
        
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        
        var data = from info in dt.AsEnumerable()
                   where info.Field<int>("isWork") == 1
                   select info;
        this.GridView2.DataSource = data.CopyToDataTable(); // 提示:数据源中没有 DataRow。
        GridView2.DataBind();
    }
}看看是什么问题  如果要实现我的那个要求应该如何写?  刚接触LinQ