Hi all I have created a user control where I will have some 3 buttons on each and every button click I will assign a grid dynamically based on the button click with few values. Every thing works fine but when I delete a row from gridview and performing button click eventn again it is not firing the button click event.
I am loading this user control in a popup of a web page and performing the operations on each click inside user control
My code in User control
DataTable dt= new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
if (ViewState["CurrentTable"] == null)
{
dt.Columns.Add("Id", typeof(string));
dt.Columns.Add("xx", typeof(string));
dt.Columns.Add("xx", typeof(string));
dt.Columns.Add("xx", typeof(string));
dt.Columns.Add("xx", typeof(string));
}
}
protected void btn1_Click(object sender, EventArgs e)
{
if (ViewState["CurrentTable"] == null)
{
}
else
{
addrow("Some", txt1.Text);
}
}
protected void grd_Deleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
{
int iIndex;
iIndex = grd.FocusedRowIndex;
dt.Rows[iIndex].Delete();
ViewState["CurrentTable"] =dt;
grd.DataSource = dt;
grd.DataBind();
}What to do to perform the button click operation to fire again after deleting a row