Hi Tsvetomir, thanks for replying, I will review the attached project. Meanwhile, I comment with more details what I want. I have a radgrid with some columns in it, to insert and edit I use an ASCX, but inside ASCX I have other controls that are populated with DataObject, but to initialize them I need parameters that I send them from the events: e.CommandName == "InitInsert" and e.CommandName == "Edit" by them is that I must cancel the default operation (e.Canceled = true;) to insert values in the IDictionary everything works fine, the only drawback is that when editing some row, the ASCX appears in the upper part as if I were inserting and not in the same row that I am editing, I understand that this happens because I cancel the default operation in the edit command (e.Canceled = true;) I have been looking for some solution but I still can not get it , let's say that the problem I have is just visualization.
if (e.CommandName == "InitInsert")
{
e.Item.OwnerTableView.ClearEditItems();
e.Canceled = true;
System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
newValues["IdHotel"] = VALUE FROM PARENT
e.Item.OwnerTableView.InsertItem(newValues);
}
else if (e.CommandName == "Edit")
{
GridEditableItem item = (GridEditableItem)e.Item;
e.Item.OwnerTableView.ClearEditItems();
e.Canceled = true;
System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
newValues["IdHotel"] = VALUE FROM PARENT
newValues["IdPaqueteHotelDetalle"] = VALUE FROM PARENT
e.Item.OwnerTableView.InsertItem(newValues);
e.Item.OwnerTableView.IsItemInserted = false;
e.Item.OwnerTableView.EditFormSettings.UserControlName = "Controles/PaqueteHotelDetalle.ascx";
}