对一个表或视图进行过滤

来源:互联网 发布:大疆无人机竞争力知乎 编辑:程序博客网 时间:2024/06/13 23:12
 DataView dv = new DataView();
   dv.Table = Th_Role.GetTable();
   dv.RowFilter = "ID='1'";
   //dv.Sort = "ID DESC";
  
   this.DataGrid1.DataSource=dv;
   this.DataGrid1.DataBind();
原创粉丝点击