Web 下的还是Windows 下的

解决方案 »

  1.   


    ((DataTable)DataGrid.DataSource).Rows.Count; C/S下
      

  2.   

    DataTable dt=(DataTable)dataGrid1.dataGrid1.DataSource;
    int S=dt.Rows.Count();
      

  3.   

    DataView tempDataView2 = new DataView(tempDataSet2.Tables[0]);
    DataGrid1.DataSource = tempDataView2;
    DataGrid1.DataBind();
    recorderCount = tempDataView2.Count;
      

  4.   

    DataSet sball=(DataSet)dataGrid1.DataSource;
      

  5.   

    还可以通过数据集来获得
    this.BindContex[this.dataset,"table"].Count;
    这种方法简单吧?
      

  6.   

    ((DataView)(this.dataDrid1.DataSource)).Count;