代码中使用DataView对象----创建DataView对象
创建DataView对象
DataTable tbl=new DataTable("table1");
DataView dv;
dv=new DataView();
dv.Table=tbl;
dv=new DataView(tbl);
//-----------------------------------------------------------------------
DataView还有一个构造函数
DataTable tbl=new DataTable("Customers");
DataViewRowState dvrs;
dvrs=DataViewRowState.ModifiedOriginal Or DataViewRowState.Deleted;
DataView dv;
dv=new DataView();
dv.Table=tbl;
dv.RowFilter="Country= 'USA' ";
dv.Sort="City DESC";
dv.RowStateFilter=dvrs;
dv=new DataView(tbl,"Country= 'USA' ","City DESC",drvs);