Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ToolBar > RadToolbar + RadWindow = problem

Not answered RadToolbar + RadWindow = problem

Feed from this thread
  • Andrey avatar

    Posted on Jan 16, 2012 (permalink)

    I created a toolbar with a button that launches a radwindow. However, when I close the radwindow, the toolbar does not respond. The mouseover and mouseclick events don't react. This problem is specific to the toolbar, because if I use a plain radbutton, it works fine.

    Default.aspx:
    <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
        CodeBehind="Default.aspx.cs" Inherits="RadToolbarWindowTest._Default" %>
     
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>
    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
        <script type="text/javascript">
            function OpenWindow(sIDsURL) {
                var oManager = GetRadWindowManager();
                oManager.open(sURLsID);
                return false;
    //                var oWnd = radopen(sURL, sID);
            }
        </script>
    </asp:Content>
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
            <telerik:RadWindowManager EnableShadow="true" Behaviors="Close, Move" ID="m_oRadWindowManager"
                runat="server" Modal="true" Skin="Windows7">
                <Windows>
                    <telerik:RadWindow ID="m_oEditLocDialog" VisibleOnPageLoad="false" Title="Edit Location"
                        VisibleStatusbar="false" NavigateUrl="Window.aspx" runat="server" Modal="true"
                        Width="550" Height="500">
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>
        <telerik:RadAjaxPanel runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
            <telerik:RadButton ID="m_oEditBtn" Text="EditBtn" runat="server" OnClick="OpenWindow">
            </telerik:RadButton>
            <telerik:RadToolBar ID="m_oOverviewToolbar" runat="server" Width="100%" EnableRoundedCorners="true"
                EnableShadows="true" OnButtonClick="OverviewToolBar_ButtonClick">
                <Items>
                    <telerik:RadToolBarButton runat="server" Text="EditTlbrBtn" CommandName="Edit">
                    </telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
        </telerik:RadAjaxPanel>
    </asp:Content>

    Default.aspx.cs:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Telerik.Web.UI;
     
    namespace RadToolbarWindowTest
    {
        public partial class _Default : System.Web.UI.Page
        {
            protected void Page_Load(object senderEventArgs e)
            {
     
            }
     
            protected void OpenWindow(object senderEventArgs e)
            {
                OpenWindow(thism_oEditLocDialognull);
            }
     
            protected void OverviewToolBar_ButtonClick(object senderRadToolBarEventArgs e)
            {
                RadToolBarButton oBtn = e.Item as RadToolBarButton;
                if (oBtn.CommandName == "Edit")
                {
                    OpenWindow(thism_oEditLocDialognull);
                }
            }
     
            public static void OpenWindow(Control oParentCtrlRadWindow oWindowstring sURL)
            {
                RadScriptManager.RegisterStartupScript(oParentCtrloParentCtrl.GetType(), "openWnd"string.Format("OpenWindow('{0}', '{1}');"oWindow.IDsURL), true);
            }
        }
    }
    

    Window.aspx:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Window.aspx.cs" Inherits="RadToolbarWindowTest.Window" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
        </div>
        </form>
    </body>
    </html>
    

    Window.aspx.cs
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
     
    namespace RadToolbarWindowTest
    {
        public partial class Window : System.Web.UI.Page
        {
            protected void Page_Load(object senderEventArgs e)
            {
     
            }
        }
    }


    This is either my fault (I don't have radtoolbar/radwindow configured correctly) or it is a bug. Any help would be greatly appreciated.

    Reply

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on Jan 19, 2012 (permalink)

    Hi Andrey,

    I've performed a couple of tests whit the implementation provide and it's working properly on my end. Please refer to the following video showing the results of my tests. Could you check whether there are any java script errors on the page after the RadWindow is closed. Also please specify the version of the controls that you are using.

    Regards,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

  • Andrey avatar

    Posted on Jan 20, 2012 (permalink)

    That's very strange. I get no javascript errors, and my code is not different from yours. Yet, when I launch the window and close it, the toolbar becomes inactive.

    If you have some time, could you please look through the project that I attached? I stripped the project down a lot to make it simple. If it does not malfunction for you then could there be some kind of configuration problem on my development computer?

    Thank you

    PS Not allowed to attach zip files. I uploaded it to mediafire: http://www.mediafire.com/?3a4a5eedfo9ae7s.

    Reply

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on Jan 25, 2012 (permalink)

    Hi Andrey,

    I've tested the sample project provided using the latest official version of the controls 2011.3.1305 and everything is working properly on my side. Could you specify which version of the controls you are using.

    Greetings,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

  • Andrey avatar

    Posted on Jan 25, 2012 (permalink)

    Version 2011.3.1115.35

    Reply

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on Jan 30, 2012 (permalink)

    Hello Andrey,

    The attached project has target framework set to .Net 4.0 , but you are using the 3.5 version of our controls. Please change you project target framework to 3.5 or use our assemblies for .NET 4.0. Also please place your RadScriptManager outside of the RadAjaxPanel and the issue should be resolved.

    Kind regards,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ToolBar > RadToolbar + RadWindow = problem
Related resources for "RadToolbar + RadWindow = problem"

[   ASP.NET ToolBar Features  |  Documentation  |  Demos  |  Telerik TV   |   Self-Paced Trainer   |  Step-by-step Tutorial  ]