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

RadToolbar + RadWindow = problem

5 Answers 122 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 1
Andrey asked on 16 Jan 2012, 07:02 PM
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.

5 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 19 Jan 2012, 09:46 AM
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
0
Andrey
Top achievements
Rank 1
answered on 20 Jan 2012, 10:02 PM
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.
0
Dimitar Terziev
Telerik team
answered on 25 Jan 2012, 01:08 PM
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
0
Andrey
Top achievements
Rank 1
answered on 25 Jan 2012, 08:06 PM
Version 2011.3.1115.35
0
Dimitar Terziev
Telerik team
answered on 30 Jan 2012, 10:27 AM
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
Tags
ToolBar
Asked by
Andrey
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Andrey
Top achievements
Rank 1
Share this question
or