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

RegisterWithScriptManager, functionality issues

5 Answers 195 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
tanima
Top achievements
Rank 1
tanima asked on 18 Nov 2010, 09:11 AM
I have downloaded trial version of TELERIK controls for ASP.Net AJAX few days back.
My application uses Callback to load content inside the RadSplitter control.(Please note not AJAX callbacks, simple callbacks)
I have set the RegisterWithScriptManager property of RadSplitter =false, to allow rendering the RadSplitter's  HTML output after  callback.

The RadSplitter gets rendered successfully, but none of the RadSplitter functionality like (resize etc) works  after the callback.
Your forums suggest to manually register the RadSplitter scripts into the RadScriptManager, to get the functionality back.
I have 2 queries-

Query 1-
Do I use the below code snippet ?
Telerik.Web.UI.RadScriptManager.RegisterClientScriptBlock(RadSplitter1 , this.GetType(), "", "", true);
 Query 2. If so what will I pass to the 4th argument ?- "script".

PLEASE TREAT THIS AS URGENT.

I need to take a business decision for using Telerik controls based on this.  Have already posted similar query earlier, but have received no response so far.
Thanks, Tanima


5 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 18 Nov 2010, 01:19 PM
Hi Tanima,

I already have answered your support ticket on the subject. for convenience I will paste my answer here as well

The scripts of the RadControls comes along with the installation. You can find the scripts' files in the Scripts folder inside the your installation folder (e.g. c:\Program Files (x86)\Telerik\RadControls For ASP.NET AJAX XXXX\Scripts). In order to register these scripts manually you need to:
  1. Copy Scripts folder to your application folder.
  2. Set the RadSplitter's EnableEmbeddedScripts property to false
  3. Add the following declaration to the ScriptManager:
    Copy Code
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Services>
            <asp:ServiceReference Path="~/WebServices/SessionTimeOutService.asmx"/>
        </Services>
        <Scripts>
           <asp:ScriptReference Path="~/Scripts/Common/Core.js" />
           <asp:ScriptReference Path="~/Scripts/Splitter/RadSplitterScripts.js" />
           <asp:ScriptReference Path="~/Scripts/Splitter/RadSlidingZoneScripts.js" />
           <asp:ScriptReference Path="~/Scripts/Common/jQuery.js" />
           <asp:ScriptReference Path="~/Scripts/Common/jQueryPlugins.js" />
           <asp:ScriptReference Path="~/Scripts/Common/Navigation/NavigationScripts.js" />
           <asp:ScriptReference Path="~/Scripts/Common/PopUp/PopUpScripts.js"/>       
        </Scripts>
    </telerik:RadScriptManager>
More detailed information on how to register manually RadControl's scripts is available in the following help article:
Disabling embedded resources


Regards,
Dobromir
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
tanima
Top achievements
Rank 1
answered on 18 Nov 2010, 02:31 PM
Hi Dobromir , I followed your solution,copied the Script folder for manual registration of scripts, but I am getting the below error on running the app-

Parser Error Message: Literal content ('<asp:ScriptReferencePath="~/Scripts/Common/Core.js"/>
      <asp:ScriptReferencePath="~/Scripts/Splitter/RadSplitterScripts.js"/>
      <asp:ScriptReferencePath="~/Scripts/Splitter/RadSlidingZoneScripts.js"/>
      <asp:ScriptReferencePath="~/Scripts/Common/jQuery.js"/>
      <asp:ScriptReferencePath="~/Scripts/Common/jQueryPlugins.js"/>
      <asp:ScriptReferencePath="~/Scripts/Common/Navigation/NavigationScripts.js"/>
      <asp:ScriptReferencePath="~/Scripts/Common/PopUp/PopUpScripts.js"/>') is not allowed within a 'System.Web.UI.ScriptReferenceCollection'.

This is the ASPX code declaration -
<body >
    <form id="form1" runat="server">
     
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Services>
            <asp:ServiceReference Path="~/WebServices/SessionTimeOutService.asmx" />
        </Services>
         
         <Scripts>
       <asp:ScriptReferencePath="~/Scripts/Common/Core.js"/>
       <asp:ScriptReferencePath="~/Scripts/Splitter/RadSplitterScripts.js"/>
       <asp:ScriptReferencePath="~/Scripts/Splitter/RadSlidingZoneScripts.js"/>
       <asp:ScriptReferencePath="~/Scripts/Common/jQuery.js"/>
       <asp:ScriptReferencePath="~/Scripts/Common/jQueryPlugins.js"/>
       <asp:ScriptReferencePath="~/Scripts/Common/Navigation/NavigationScripts.js"/>
       <asp:ScriptReferencePath="~/Scripts/Common/PopUp/PopUpScripts.js"/>       
    </Scripts>
    </telerik:RadScriptManager>
      
    <telerik:RadSplitter EnableEmbeddedScripts="false" RegisterWithScriptManager="false"
        ID="RadSplitter1" runat="server" Orientation="Horizontal" Height="100%" Width="100%">
        <telerik:RadPane ID="RadPanTOP" runat="server" Height="40%" Width="50%">
            <label>
                Click to view article contentssss</label>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitBarMain" CollapseMode="Both" runat="server">
        </telerik:RadSplitBar>
        <telerik:RadPane ID="RadPanBottom" runat="server" Height="60%" Width="50%">
            <div id="divBottom">
            </div>
        </telerik:RadPane>
    </telerik:RadSplitter>   
    </form>
</body>
0
Dobromir
Telerik team
answered on 18 Nov 2010, 02:50 PM
Hi Tanima,

We are not aware of such problem and I was unable to reproduce it locally. Could you please provide a simple runnable project reproducing the problem so we can investigate it further?

Greetings,
Dobromir
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
tanima
Top achievements
Rank 1
answered on 19 Nov 2010, 07:59 AM
Hi Dobromir,  I have mailed you a small working version of my project in the support ticket at
http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=367677
, for the callback issue I am still facing. Yet awaiting your response.
Thanks, Tanima
0
Dobromir
Telerik team
answered on 22 Nov 2010, 10:30 AM
Hi Tanima,

I already answered to your support ticket on the subject. For convenience I will paste my answer here as well.

The problem with the functionality of the Splitter control occurs because of the used approach to display it on the page. RadSplitter is a control based on the ASP.NET AJAX framework and its client-side functionality is registered during the ASP.NET Sys.Application.Load event. Since you are modifying the DOM with the callback to add the RadSplitter's generated HTML and JavaScript during the callback, the script responsible for the registration of the RadSplitter functionality is never called. A detailed explanation and a solution for such scenarios is available in the following forum post:
Client Callback to return Html + JS for new Telerik Control


Greetings,
Dobromir
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
ScriptManager and StyleSheetManager
Asked by
tanima
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
tanima
Top achievements
Rank 1
Share this question
or