private static string SuSheName_private;
private void DataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
this.DataGrid1.EditItemIndex = e.Item.ItemIndex;
SuSheName_private = this.DataGrid1.Items[e.Item.ItemIndex].Cells[0].Text.Trim().ToString();
this.BindToDG();
}
private void DataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
//对SuSheName_private进行判断;
}
我想取出原SuSheName_private进行判断以进行后面的操作。private void DataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
this.DataGrid1.EditItemIndex = e.Item.ItemIndex;
SuSheName_private = this.DataGrid1.Items[e.Item.ItemIndex].Cells[0].Text.Trim().ToString();
this.BindToDG();
}
private void DataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
//对SuSheName_private进行判断;
}
可SuSheName_private总是为空。
请问是哪里出了问题?