e.Item.FindControl("ControlName") 
or
e.Item.Controls[i]

解决方案 »

  1.   

    e.item.controls
    取他的文字用什么属性?按钮列没有搞错,因为我可以取不是模板列的那些列,然后再把那么些改为模板列就取不出来了
      

  2.   

    使用(Label)e.Item.Cells[i].FindControl("lbl"),其中i是你要得到列的索引,从0开始,隐藏的也算,找到你要操作的控件,操作这个得到的控件就可以了。
      

  3.   

    对,datagrid 的索引应该从0开始
      

  4.   

    Button btn=(Button)e.Item.Cells[1].Controls[0];
    Response.Write(btn.Text);