This is a migrated thread and some comments may be shown as answers.

ASCX: The control requires a ScriptManager on the page.

7 Answers 268 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Jon (I.T. Agility Inc.)
Top achievements
Rank 1
Jon (I.T. Agility Inc.) asked on 23 Jul 2009, 09:13 PM
so far - completely unable to get telerik Q2 2009 to work in MVC projects using any sort of encapsulation with ascx files.

Trying to use a combo box inside a ascx that is rendered with Html.RenderPartial.

Is this possible?  Or do all the rad controls have to go in the aspx views?

7 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 24 Jul 2009, 08:16 AM
Hi CharmingSoft,

I suggest you check our MvcForums demo. It shows how to use RadControls in partial views (user controls).
You can download the source code from here.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jon (I.T. Agility Inc.)
Top achievements
Rank 1
answered on 24 Jul 2009, 01:04 PM
Thanks Albert.  So a ScriptManager is required inside every partial view.  Is this going to be inefficient? 

Thanks.

jon
0
Atanas Korchev
Telerik team
answered on 24 Jul 2009, 01:20 PM
Hi Jon,

There are no known performance issues with that approach.

All the best,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jon (I.T. Agility Inc.)
Top achievements
Rank 1
answered on 24 Jul 2009, 01:23 PM
Thanks Albert.

One last question, I noticed the Skin rendering fails for controls inside partial views - is there a solution for this?

Jon

0
Atanas Korchev
Telerik team
answered on 24 Jul 2009, 01:32 PM
Hello,

You can either manually include the skins CSS files or add a RadStyleSheetManager control in your partial views.

Greetings,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sergio
Top achievements
Rank 1
answered on 27 Jul 2009, 03:25 AM
Hello,

I am having some problems with a RadDatePicker control in a partial view (ascx).
I get a javascript error (Expected :) in the line that begins with:

Sys.Application.add_init(function(){$create(Telerik.Web.UI.RadDatePicker, {"_PopupButtonSettings":.....



In the ascx I have:

    <telerik:RadStyleSheetManager runat="server" ID="RadStyleSheetManager1">

<StyleSheets>

<telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Editor.css" />

<telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Forest.Editor.Forest.css" />

</StyleSheets>

    </telerik:RadStyleSheetManager>

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" EnableScriptCombine="true">

</telerik:RadScriptManager>

...
..

<telerik:RadDatePicker runat="server" Width="161px" ID="birthDayPicker" MinDate="1920-01-01" >

<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"></Calendar>

<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

</telerik:RadDatePicker>


In the web.config I have:


<httpHandlers>

      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />

...

    <handlers>

      <add name="Telerik.Web.UI.WebResource.axd" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode" />



Thanks a lot for your help



0
BaiH
Top achievements
Rank 1
answered on 28 Jul 2009, 07:26 AM
Sergio, Check this forum thread for a similar discussion. It did the trick for me.

--BH
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Jon (I.T. Agility Inc.)
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Jon (I.T. Agility Inc.)
Top achievements
Rank 1
Sergio
Top achievements
Rank 1
BaiH
Top achievements
Rank 1
Share this question
or