Custom controls and built in templates

Posted by Community Admin on 03-Aug-2018 03:04

Custom controls and built in templates

All Replies

Posted by Community Admin on 07-Dec-2010 00:00
I tried to add a RadMenu into an ascx and drop it onto a built-in layout template via the toolbox (obviously after registering it)

But it complains about the lack of ScriptManager...now I can get it to work by putting a script manager in the ascx (renders in preview), but then in edit mode it says I can only have one on the page at a time so i'm not getting any preview rendered.

Ivan mentioned in another post that the scriptmanager should be auto-generated on the built-in templates?

Steve
Posted by Community Admin on 07-Dec-2010 00:00
Hello Steve,

You can check for the ScriptManager in the code behind of your control, so it will not be added twice. I noticed some issues with this and we have task to instigate the issue.

if (ScriptManager.GetCurrent(page) == null)
    page.Form.Controls.Add(new ScriptManager());


Kind regards,
Ivan Dimitrov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
This thread is closed