How to Programmatically Delete a ControlPresentation Item
Hello,
Need to complement my module installation and update process with deletion and update of control templates.
Right now I'm using to create the templates:
var template = PageManager.GetManager().CreatePresentationItem<ControlPresentation>(Guid.NewGuid());
template.DataType = ...
template.EmbeddedTemplateName = ....
template.Name = ...
template.ControlType = ...
.....
How can I Delete using similar API calls..
Thanks for your help.
Hello Ronnie,
The Delete() method of PageManager has an overload accepting PresentationData item, so you can just pass it as an argument, and then call SaveChanges() to commit the transaction.
Kind regards,
Boyan Barnev
the Telerik team
..
Yes That's how it should be done !
Tks.