RegisterWithScriptManager, functionality issues

6 posts, 0 answers
  1. tanima
    tanima avatar
    5 posts
    Member since:
    Nov 2010

    Posted 18 Nov 2010 Link to this post

    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


  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 18 Nov 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. tanima
    tanima avatar
    5 posts
    Member since:
    Nov 2010

    Posted 18 Nov 2010 Link to this post

    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>
  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 18 Nov 2010 Link to this post

    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.
  6. tanima
    tanima avatar
    5 posts
    Member since:
    Nov 2010

    Posted 19 Nov 2010 Link to this post

    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
  7. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 22 Nov 2010 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017