Hi
I have the following code and why can't i change the value of myvar in the
DataGrid1_editcommand event so that the (changed) value of myvar is there in
the Update event?? (it fires i debugged it!):
namespace MYproject
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
public class MyUsercontrol: System.Web.UI.UserControl
{
public string myvar ="hello";
private void Page_Load(object sender, System.EventArgs e)
{
}
public void DataGrid1_EditCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
myvar ="goodbye"; //enters this code first
}
private void DataGrid1_UpdateCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
string temp; // enters this code next!!!
temp = myvar; // myvar = "hello" ???? instead of the wanted "goodbye"
}
}
}
how can i program this so i can keep my changes in this variable?
ch Mike