新增按钮事件:
---------------------------------
int index  = DataGrid1.Items.Count;
m_ecaDataSet.DataSet.Tables[0].Add(m_ecaDataSet.DataSet.Tables[0].NewRow);
DataGrid1.EditItemIndex  = index;
DataGrid1.DataSource = m_ecaDataSet.DataSet.Tables[0];  
DataGrid1.DataBind();  
----------------------------------
点新增后DataGrid1可出现新行。但点“保存”按钮没有触发DataGrid_UpdateCommand,请问这是为什么??
编辑和删除的时候都没有问题。
private void InitializeComponent()
{    
this.btnAdd.Click += new EventHandler(btnAdd_Click);
DataGrid1.CancelCommand += new DataGridCommandEventHandler(this.DataGrid_CancelCommand);
DataGrid1.EditCommand += new DataGridCommandEventHandler(this.DataGrid_EditCommand);
DataGrid1.UpdateCommand += new DataGridCommandEventHandler(this.DataGrid_UpdateCommand);
DataGrid1.DeleteCommand += new DataGridCommandEventHandler(this.DataGrid_DeleteCommand);
DataGrid1.ItemCreated += new DataGridItemEventHandler(this.DataGrid_ItemCreated);
}