Using AJAX Toolkit Modal Dialog on same page as Telerik Controls

6 posts, 0 answers
  1. Andrew Taylor
    Andrew Taylor avatar
    3 posts
    Member since:
    Dec 2009

    Posted 08 Mar 2010 Link to this post

    I know this is not officially supported, but I would like to find out if you guys know of any unofficial support, as I have seen in your support forums, that it used to be possible and there were some work arounds.

    Do to limitations of design with RadWindow and RadDock, I would like to use the AJAX Modal Dialog control from the AJAX Toolkit on my site.  I know it's not recommended, but the fact is, RadWindow and RadDock do not offer the same functionality, and require far more code to accomplish the functionality I desire. 

    However of course the AJAX Toolkit requires the <asp:AjaxScriptManager> which can't be on the same page as the <telerik:ScriptManager>  so do you guys know any method off the top of your heads to get the AJAX Toolkit to use the Telerik script manager?

    Thanks!
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 08 Mar 2010 Link to this post

    Hi Andrew,

    When you use RadScriptManager, there is no need to add asp:scriptmanager to the page - our manager serves the same purpose and adds additional features to the original script manager. It works with the modalpopupextender as well.
    Could you please tell me what were the problems that you encountered with RadDock and RadWindow?

    All the best,
    Georgi Tunev
    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.
  3. Andrew Taylor
    Andrew Taylor avatar
    3 posts
    Member since:
    Dec 2009

    Posted 08 Mar 2010 Link to this post

    Georgi,

    The problem isn't with needing <asp:ScriptManager> it's with needing <asp:AjaxScriptManager> used by the ASP.Net AJAX Toolkit.  When I add the AJAX Toolkit Modal Popup control to the form, it says it can't find the <asp:AjaxScriptManager> required. 
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 11 Mar 2010 Link to this post

    Hello again Andrew,

    Thank you for the clarification - now I see the problem. To fix it, you should add the MS AJAX's scripts manually (they are available in the AspNetAjaxLibrary - copy them in your application from the zipped distribution and set the path property accordingly)

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
        <style type="text/css">
            .modalBackground
            {
                background-color: Gray;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="ScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
                    Name="MicrosoftAjax.js" Path="~/MicrosoftAjax/MicrosoftAjax.js" />
                <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
                    Name="MicrosoftAjaxWebForms.js" Path="~/MicrosoftAjax/MicrosoftAjaxWebForms.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <asp:Panel ID="Panel1" runat="server" Width="300" Height="300">
            some text here<br />
            and some button:
            <asp:Button ID="Button1" runat="server" Text="Button" />
        </asp:Panel>
        <asp:LinkButton ID="LinkButton1" runat="server" Text="open modal popup"></asp:LinkButton>
        <ajaxToolkit:ModalPopupExtender ID="MPE" runat="server" TargetControlID="LinkButton1"
            PopupControlID="Panel1" BackgroundCssClass="modalBackground" />
        </form>
    </body>
    </html>


    Regards,
    Georgi Tunev
    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.
  5. Andrew Taylor
    Andrew Taylor avatar
    3 posts
    Member since:
    Dec 2009

    Posted 11 Mar 2010 Link to this post

    Thanks Georgi,

    I believe I had it mostly working, but was having some difficulties in getting the telerik combo boxes to work on their modal dialog.  The drop down part of the combo was coming up behind the modal.  :(
  6. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 16 Mar 2010 Link to this post

    Hi Andrew,

    The problem with the combobox is that modalpopupextender's z-index is very high (10000 by default) which is much higher than our controls' z-Index. To fix this, you could either lower the z-Index's value of the popup extender or to increase RadControls' one by using the style properly as shown in the help article linked above.


    Best wishes,
    Georgi Tunev
    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.
Back to Top