I'm using Sitecore 8. I have custom ModalDialog, it is getting triggered by a button in the Ribbon (Content Editor).
On the Dialog backend, I'm removing the scope Item. So OnOk I want Refresh the Parent and load Parent item on dialog close.
I have the following code but it is not working,
protected override void OnOK(object sender, EventArgs args)
{
//ScopeItem - Current Item in the Content Tree
//db - Database
RemoveItem(ScopeItem, db);
//ScopeItemParent- Current Item's Parent Item
Context.ClientPage.SendMessage(this, string.Format("item:updated(id={0})", ScopeItemParent.ID));
Context.ClientPage.SendMessage(this, string.Format("item:refreshchildren(id={0})", ScopeItemParent.ID));
Context.ClientPage.ClientResponse.Timer(string.Format("item:load(id={0})", ScopeItemParent.ID), 100);
base.OnOK(sender, args);
}
Thanks for your help.