将填充后的DataSet中的DataTable进行二次处理,转换为2列,然后再绑定到DataGrid中

解决方案 »

  1.   

    回复人: jiezhi(風依舊) ( ) 信誉:100  2004-10-25 11:49:00  得分: 0  
     
     
       那你不如事先处理了
      
    这什么意思?
    能详细说说?
      

  2.   

    转换为2列??什么意思?  一楼的意思是先处理表结构在添到 DataSet 中如,如果 DataSet 含有你要添的表,先Remove 然后 merge
      

  3.   

    DataTable.Select[C#] 
    private void GetRowsByFilter(){
       DataTable myTable;
       myTable = DataSet1.Tables["Orders"];
       // Presuming the DataTable has a column named Date.
       string strExpr;
       strExpr = "Date > '1/1/00'";
       DataRow[] foundRows;
       // Use the Select method to find all rows matching the filter.
       foundRows = myTable.Select(strExpr);
       // Print column 0 of each returned row.
       for(int i = 0; i < foundRows.Length; i ++){
          Console.WriteLine(foundRows[i][0]);
       }
    }