这是在showfooter行增加textbox,把showfooter行当作添加行,代码于下,
if(e.Item.ItemType== ListItemType.Footer)
{
int i=0; LinkButton lb;
foreach (TableCell   c in e.Item.Cells)
{
if(i<e.Item.Cells.Count-1)
{
c.Controls.Add(new TextBox());
i++;
}
  else  if(i==e.Item.Cells.Count-1)
 {
 lb= new LinkButton();
 lb.Text="添加";
 lb.CommandName="Insert";
 c.Controls.Add(lb);
 }

}以下是当linkbutton为insert时的代码:
if(e.CommandName ==("Insert"))
{
sqlDataAdapter1.Fill( dataSet11);
  A91YXZKRow =(basic.DataSet1.A91YXZKRow)dataSet11.A91YXZK.NewRow();
A91YXZKRow.ID=((TextBox)e.Item.Cells[1].Controls[0]).Text;
A91YXZKRow.collegecode=((TextBox)e.Item.Cells[2].Controls[0]).Text;
A91YXZKRow.collegename=((TextBox)e.Item.Cells[3].Controls[0]).Text;
A91YXZKRow.re=((TextBox)e.Item.Cells[4].Controls[0]).Text;
ds.A91YXZK.AddcustomerRow(A91YXZKRow);
sqlDataAdapter1.Update(dataSet11,"A91YXZK");
dataSet11.AcceptChanges();
BindGrid();
DataGrid1.ShowFooter=false;
}现在我想问,谁能告诉我A91YXZKRow代表什么意思,对应的是什么?