dataset 排序

//DataView    
  DataView   dv   =   new   DataView();  
  dv.Table   =   DataSet1.Tables["Suppliers"];  
  dv.RowFilter   =   "City   =   'Berlin'";  
  dv.Sort   =   "CompanyName   DESC";  
   
   
  //Select  
  string   strExpr;  
  string   strSort;  
   
  strExpr   =   "id   >   5";  
  //   Sort   descending   by   column   named   CompanyName.  
  strSort   =   "name   DESC";  
  //   Use   the   Select   method   to   find   all   rows   matching   the   filter.  
  DataRow[]   foundRows   =    
  customerTable.Select(   strExpr,   strSort,   DataViewRowState.Added   );

你可能感兴趣的:(Data)