1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Custom controls and built in templates

Custom controls and built in templates

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    07 Dec 2010
    Link to this post
    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
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    07 Dec 2010
    Link to this post
    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
2 posts, 0 answered