Good morning, dear Telerik wizards,
Simple scenario.. RadGrid showing fine. On particular context menu click, opening via popup one of a number of DIFFERENT edit user controls. For example:
Probably don't need all of those lines in there... but when the Rebind is executed,the user control pops up just fine. This particular one is focussed on gathering adequate permissions before delete of task is authorized. Delete in this case is NOT a delete of record, but a change of status of a record... so it is really an update.
When done, I get the popup to go away by:
My own (better for many complex situations) recursive Find Control locates the calling grid... again not sure that I need all the lines... but it closes, delete (which is change of state) is accomplished earlier, all is well.
Problem: Next time I come in to do another delete, the popup user control contains the data from the PRIOR delete, not the current one.
So two questions:
1. How can I make sure the edit control either unloads inbetween calls or resets the data properly? Important
2. What can I delete from this code as unnecessary? Just out of curiosity.
Thanks.
Chris
Simple scenario.. RadGrid showing fine. On particular context menu click, opening via popup one of a number of DIFFERENT edit user controls. For example:
RGVMyTasksAll.MasterTableView.EditFormSettings.UserControlName = "MemberITaskDelete.ascx";
RGVMyTasksAll.MasterTableView.EditFormSettings.PopUpSettings.Width = 400;
sEditTUID = RGVMyTasksAll.Items[radGridClickedRowIndex].Cells[2].Text;
tName = RGVMyTasksAll.Items[radGridClickedRowIndex].Cells[4].Text;
RGVMyTasksAll.MasterTableView.EditFormSettings.CaptionFormatString = "Deleting Task: " + tName.ToUpper();
RGVMyTasksAll.Items[radGridClickedRowIndex].Edit = true;
ck = new HttpCookie("ITID", sEditTUID);
Response.Cookies.Add(ck);
RGVMyTasksAll.MasterTableView.AllowAutomaticInserts = false;
RGVMyTasksAll.MasterTableView.AllowAutomaticUpdates = false;
RGVMyTasksAll.Rebind();
break;
When done, I get the popup to go away by:
RadGrid rg = (RadGrid)CMFinds.FindControl(p, "RGVMyTasksAll");
rg.AllowAutomaticInserts = false; rg.AllowAutomaticUpdates = false; rg.AllowAutomaticDeletes = false;
rg.MasterTableView.AllowAutomaticInserts = false; rg.MasterTableView.AllowAutomaticUpdates = false; rg.MasterTableView.AllowAutomaticDeletes = false;
rg.MasterTableView.IsItemInserted = false;
rg.MasterTableView.ClearChildEditItems();
rg.Rebind();
Problem: Next time I come in to do another delete, the popup user control contains the data from the PRIOR delete, not the current one.
So two questions:
1. How can I make sure the edit control either unloads inbetween calls or resets the data properly? Important
2. What can I delete from this code as unnecessary? Just out of curiosity.
Thanks.
Chris