小弟用this.DataGrid1.DataSource=ds.Tables[0];
     DataTable table=ds.Tables[0];
      this.DataGrid1.DataBind();
把数据绑在DATAGRID里。可是我想去DATAGRID的一行数据。。怎么取啊。我绑进DATAGRID的数据是没数据库名字的没自段名的。是远程的数据过来的我需要处理这些数据所以要取一行一行的数据。没有数据库字段名

解决方案 »

  1.   

    DataRow tr=ds.Tables[0][0]; //取第一行
      

  2.   

    DataRow tr=ds.Tables[0].Row[0]; //取第一行
      

  3.   

    DataRow tr=ds.Tables[0][0];
    ??
    我用什么来装
    Label.Text = tr.ToString();???这样吗
      

  4.   

    DataRow tr=ds.Tables[0].Row[0]
    ??
    我用什么来装
    Label.Text = tr.ToString();
    不行哦。System.Data.DataRow 
      

  5.   

    DataTable table=ds.Tables[0];??
    这个???
      

  6.   

    为什么我的BUTTON按钮要点2下才有反应
      

  7.   

    DataRow tr=ds.Tables[0].Rows[0];
    string lblA=tr[0].toString();
    string lblB=tr[1].toString();
    string lblN=tr[n].toString();
      

  8.   

    sandy831() ( ) 信誉:100    Blog  2006-10-19 00:34:00  得分: 0  
     
     
       为什么我的BUTTON按钮要点2下才有反应
     
     
    Page_Load()里加
    if(!IsPostBack())
    {}
      

  9.   

    你想怎么处理啊,怎么存在哪都要问别人呢直接在datagrid里便利就可以取出来,方法很多