Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I've created a custom section where I load Media objects and show their details (similar to Media section).
On deleting event (Media_AfterDelete) I fail to refresh the nodes tree.
I tried with:
Media.AfterDelete += new Media.DeleteEventHandler(Media_AfterDelete);
void Media_AfterDelete(Media sender, umbraco.cms.businesslogic.DeleteEventArgs e)
{
Document obj = new Document(sender.Id);
((BasePage)obj.HttpContext.CurrentHandler).reloadParentNode();
}
but it doesn't work.
(Document cast is a trick to call reloadParentNode(), it works for New and Move events)
How can I call the refresh/reload function for the Media nodes tree
hi, not sure whether this will work for you but following logic from video tutorials (umbraco.tv) on building new section by Tim I created method
public bool Save() { return true; }
and I call it when I need instant page refresh. Works for me on aspx pages but not on ascx user controls.
Hope it helps.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Reload tree node on Media deleting
I've created a custom section where I load Media objects and show their details (similar to Media section).
On deleting event (Media_AfterDelete) I fail to refresh the nodes tree.
I tried with:
Document obj = new Document(sender.Id);
((BasePage)obj.HttpContext.CurrentHandler).reloadParentNode();
}
but it doesn't work.
(Document cast is a trick to call reloadParentNode(), it works for New and Move events)
How can I call the refresh/reload function for the Media nodes tree
hi, not sure whether this will work for you but following logic from video tutorials (umbraco.tv) on building new section by Tim I created method
public bool Save()
{
return true;
}
and I call it when I need instant page refresh. Works for me on aspx pages but not on ascx user controls.
Hope it helps.
is working on a reply...