Ambigious Match Found Error

7 posts, 0 answers
  1. Jeff Trudel
    Jeff Trudel avatar
    4 posts
    Member since:
    Feb 2007

    Posted 28 Jun 2007 Link to this post

    Hi,
    I was hoping someone could help me with the following issue:
    I have a portal site that allows users to choose various "parts" to add to the page and creates new radDocks dynamically inside different zones.  I am using an UpdatePanel for the AJAX type moves and updates.  Everything works fine up to the actual UpdatePanel functions, i.e. the control is added to the UpdatePanel, but not moved.  If I refresh the page, then the control appears in the UpdatePanel.  If I move the radDock, delete it, or try to open a new one I get the "Ambigious Match Found" error as a javascript type alert (popup).  As a result of this the docks are not being moved to the zones, and the zone is not being saved in the database as part of the state.
    Here is the Add Dock Code:

            protected void addDock_Click(object sender, EventArgs e)  
            {  
     
                RadDock _dk = CreateDock(int.Parse(DroptDownWidget.SelectedValue), DroptDownWidget.Text);  
                UpdatePanel1.ContentTemplateContainer.Controls.Add(_dk);  
                CreateSaveStateTrigger(_dk);  
                ScriptManager.RegisterStartupScript(  
                    _dk,  
                       this.GetType(),  
                       "DockIntoZone",  
                       string.Format(@"function _addDock() {{" +  
                       "Sys.Application.remove_load(_addDock);" +  
                       "$find('{1}').dock($find('{0}'));" +  
                       "$find('{0}').doPostBack('DockPositionChanged');" +  
                       "}};" +  
                       "Sys.Application.add_load(_addDock);",_dk.ClientID,FindClientId(DropDownZone.SelectedValue)),  
                true);  
    }  
            protected void _dock_Command(object sender, DockCommandEventArgs e)  
            {  
                if (e.Command.Name == "Close")  
                {  
                    ScriptManager.RegisterStartupScript(  
                        UpdatePanel1,  
                        this.GetType(),  
                        "RemoveDock",  
                        string.Format("function _removeDock() {{" +  
                            "Sys.Application.remove_load(_removeDock);" +  
                            "$find('{0}').undock();" +  
                            "$get('{1}').appendChild($get('{0}'));" +  
                            "$find('{0}').doPostBack('DockPositionChanged');" +  
                            "}};" +  
                            "Sys.Application.add_load(_removeDock);", ((RadDock)sender).ClientID, UpdatePanel1.ClientID),  
                        true);  
                }  
            }  
    protected RadDock CreateDock(PageWidgetInfo pageWidget)  
            {  
                RadDock _dock = new RadDock();  
                if (!string.IsNullOrEmpty(pageWidget.State))  
                    _dock.ApplyState(DockState.Deserialize(pageWidget.State));  
                _dock.Title = pageWidget.Name;  
                _dock.ID = pageWidget.ID.ToString();  
                _dock.Tag = pageWidget.ID.ToString();  
                _dock.EnableEmbeddedSkins = false;  
                _dock.Skin = "User";  
                _dock.ForbiddenZones = new string[] { "zoneNews", "zoneBravo","zoneStories","zoneEmployeeNews","zoneEnsemble" };  
                BaseWidget _widget = LoadControl(pageWidget.Path) as BaseWidget;  
                if (_widget == null)  
                {  
                    throw new Exception(string.Format("The UserControl with path '{0}' does not inherit from the BaseWidget. All widgets must inherit from BaseWidget.", pageWidget.Path));  
     
                }  
                _dock.ContentContainer.Controls.Add(_widget);  
                _widget.Configuration = pageWidget.Configuration;  
                _dock.Commands.Add(new DockCloseCommand());  
                _dock.Commands.Add(new DockExpandCollapseCommand());  
                _dock.Command += new DockCommandEventHandler(_dock_Command);  
                return _dock;  
            }  
            protected RadDock CreateDock(int widgetId, string widgetConfiguration)  
            {  
                WidgetInfo _widget = WidgetInfo.Select(widgetId);  
                if (_widget == null)  
                {  
                    throw new Exception(string.Format("Cannot find Widget with ID={0}.", widgetId));  
                }  
                PageWidgetInfo _newPageWidget = PageWidgetInfo.Insert(PageID, widgetId, _widget.Name, string.Empty);  
                PageWidgets.Add(_newPageWidget);  
                RadDock _dock = CreateDock(_newPageWidget);  
               return _dock;  
            }  
     



    As you can tell, I used the examples provided by Telerik.

    Any help would be appreciated.

  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 29 Jun 2007 Link to this post

    Hello Jeff,

    What are the values of the items in DropDownZone? You should use ClientID (not ID) if the zones are inside user control, or you have master page. If this does not help, send me a working application which could be used to reproduce the problem and I will respond with a solution ASAP.

    Kind regards,
    Valeri Hristov (Senior Developer, MCSD)
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Jeff Trudel
    Jeff Trudel avatar
    4 posts
    Member since:
    Feb 2007

    Posted 29 Jun 2007 Link to this post

    Thanks for the reply,
    The values in the DropDownZone are zoneLeft, zoneRight, and zoneCenter. I am using ClientID already (I'm assuming you mean in the ScriptManager.RegisterStartupScript lines).  I am using user controls inside the zone, and I am not using a master page for the portal page.
    I am not able to send you a working copy of the project, but I have included the entire .cs file that I am using.
        public partial class _Portal : System.Web.UI.Page  
        {
            #region Fields  
            private AsyncServiceProxy.AsyncServiceCalls proxy;  
            private AsyncServiceProxy.WSHeaders headers;  
            private enum ContentID  
            { currentnews = 146, employeenews = 152, ourstories=150,ensemble=122,photooftheweek=154,bravo=148 };  
            ContentWS service = new ContentWS();  
            int lang = 1033;  
            public DataTable labels;  
            int PageID = 1;  
            List<PageWidgetInfo> _pageWidgets;
            #endregion  
            #region Properties  
     
     
            protected List<PageWidgetInfo> PageWidgets  
            {  
                get 
                {  
                    if (_pageWidgets == null)  
                    {  
                        _pageWidgets = PageWidgetInfo.SelectPageWidgets(PageID);  
                        //_pageWidgets.Sort();  
                    }  
                    return _pageWidgets;  
                }  
            }
            #endregion  
            #region Methods: Protected  
     
            protected RadDock CreateDock(PageWidgetInfo pageWidget)  
            {  
                RadDock _dock = new RadDock();  
                if (!string.IsNullOrEmpty(pageWidget.State))  
                    _dock.ApplyState(DockState.Deserialize(pageWidget.State));  
                _dock.Title = pageWidget.Name;  
                _dock.ID = pageWidget.ID.ToString();  
                _dock.Tag = pageWidget.ID.ToString();  
                _dock.EnableEmbeddedSkins = false;  
                _dock.UniqueName = Guid.NewGuid().ToString();  
                _dock.Skin = "User";  
                _dock.ForbiddenZones = new string[] { "zoneNews""zoneBravo","zoneStories","zoneEmployeeNews","zoneEnsemble" };  
                BaseWidget _widget = LoadControl(pageWidget.Path) as BaseWidget;  
                if (_widget == null)  
                {  
                    throw new Exception(string.Format("The UserControl with path '{0}' does not inherit from the BaseWidget. All widgets must inherit from BaseWidget.", pageWidget.Path));  
     
                }  
                _dock.ContentContainer.Controls.Add(_widget);  
                _widget.Configuration = pageWidget.Configuration;  
                _dock.Commands.Add(new DockCloseCommand());  
                _dock.Commands.Add(new DockExpandCollapseCommand());  
                _dock.Command += new DockCommandEventHandler(_dock_Command);  
                return _dock;  
            }  
            protected RadDock CreateDock(int widgetId, string widgetConfiguration)  
            {  
                WidgetInfo _widget = WidgetInfo.Select(widgetId);  
                if (_widget == null)  
                {  
                    throw new Exception(string.Format("Cannot find Widget with ID={0}.", widgetId));  
                }  
                PageWidgetInfo _newPageWidget = PageWidgetInfo.Insert(PageID, widgetId, _widget.Name, string.Empty);  
                PageWidgets.Add(_newPageWidget);  
                RadDock _dock = CreateDock(_newPageWidget);  
               return _dock;  
            }
            #endregion  
            #region Event Handlers  
     
            protected void Page_Load(object sender, EventArgs e)  
            {  
                if (!this.lbShow.Text.Contains("Basic"))  
                    this.tipView.Text = "Basic View is the default, standard design. <br /> In this mode, you will have minimal customization available.";  
                else 
                    this.tipView.Text = "Advanced View is used for portal functionality. <br /> In this mode, you can add, move, and delete various widgets based upon your needs and personal preferences. <br /> Documents and external links will also open in a new window and can be minimized to the upper left corner";  
              
                }  
            protected override void OnInit(EventArgs e)  
            {  
                foreach (PageWidgetInfo pageWidget in PageWidgets)  
                {  
                    RadDock _dock = CreateDock(pageWidget);  
                    widgetMgr.Controls.Add(_dock);  
                    CreateSaveStateTrigger(_dock);  
                }  
                base.OnInit(e);  
            }  
            protected override void OnLoad(EventArgs e)  
            {  
                if (!IsPostBack)  
                {  
                    DroptDownWidget.DataSource = WidgetInfo.Select();  
                    DroptDownWidget.DataTextField = "Name";  
                    DroptDownWidget.DataValueField = "ID";  
                    DroptDownWidget.DataBind();  
                }  
                base.OnLoad(e);  
            }   
            protected void _dock_Command(object sender, DockCommandEventArgs e)  
            {  
                if (e.Command.Name == "Close")  
                {  
                    ScriptManager.RegisterStartupScript(  
                        UpdatePanel1,  
                        this.GetType(),  
                        "RemoveDock",  
                        string.Format("function _removeDock() {{" +  
                            "Sys.Application.remove_load(_removeDock);" +  
                            "$find('{0}').undock();" +  
                            "$get('{1}').appendChild($get('{0}'));" +  
                            "$find('{0}').doPostBack('DockPositionChanged');" +  
                            "}};" +  
                            "Sys.Application.add_load(_removeDock);", ((RadDock)sender).ClientID, UpdatePanel1.ClientID),  
                        true);  
                }  
            }  
            protected void widgetMgr_LoadDockLayout(object sender, Telerik.Web.UI.DockLayoutEventArgs e)  
            {  
                foreach (DockState state in CurrentDockStates)  
                {  
                    e.Positions[state.UniqueName] = state.DockZoneID;  
                    e.Indices[state.UniqueName] = state.Index;  
     
                }  
            }  
            protected void widgetMgr_SaveDockLayout(object sender, Telerik.Web.UI.DockLayoutEventArgs e)  
            {  
                foreach (DockState state in widgetMgr.GetRegisteredDocksState())  
                {  
                    try 
                    {  
                        int _stateWidgetID = int.Parse(state.Tag);  
                        PageWidgetInfo _pageWidget = FindWidget(_stateWidgetID);  
                        if (_pageWidget != null && !state.Closed)  
                        {  
                            _pageWidget.State = state.ToString();  
                            _pageWidget.Update();  
                        }  
                        else 
                        {  
                            PageWidgetInfo.Delete(_stateWidgetID);  
                        }  
                    }  
                    catch (System.ArgumentNullException ex)  
                    {  
                          
                          
                    }  
                }  
     
            }  
            protected void addDock_Click(object sender, EventArgs e)  
            {  
     
                RadDock _dk = CreateDock(int.Parse(DroptDownWidget.SelectedValue), DroptDownWidget.Text);  
                UpdatePanel1.ContentTemplateContainer.Controls.Add(_dk);  
                CreateSaveStateTrigger(_dk);  
                ScriptManager.RegisterStartupScript(  
                    _dk,  
                       this.GetType(),  
                       "DockIntoZone",  
                       string.Format(@"function _addDock() {{" +  
                       "Sys.Application.remove_load(_addDock);" +  
                       "$find('{1}').dock($find('{0}'));" +  
                       "$find('{0}').doPostBack('DockPositionChanged');" +  
                       "}};" +  
                       "Sys.Application.add_load(_addDock);",_dk.ClientID,FindClientId(DropDownZone.SelectedValue)),  
                true);  
    //            ScriptManager.RegisterStartupScript(_dk,  
    //                                                this.GetType(),  
    //                                                "DockIntoZone",  
    //                                                string.Format(@"  
    //                                                Sys.Application.add_load(function(){{  
    //                                                if(typeof(Telerik.Dock{0}Moved)=='undefined')  
    //                                                {{  
    //                                                $find('{1}').dock($find('{0}'));  
    //                                                Telerik.Dock{0}Moved=true;  
    //                                                }}  
    //                                                }});",  
    //                                                _dk.ClientID, DropDownZone.SelectedValue),  
    //                                                true);  
                 
               // _dk.Tag = DroptDownWidget.SelectedValue;  
              //  LoadWidget(_dk);  
            }
            
            #endregion  
            #region Methods: Private  
     
            private string FindClientId(string value)  
            {  
                switch (value)  
                {  
                    case "zoneLeft":  
                        return this.zoneLeft.ClientID;  
                        break;  
                    case "zoneRight":  
                        return this.zoneRight.ClientID;  
                        break;  
                    case "zoneCenter":  
                        return this.zoneCenter.ClientID;  
                        break;  
                    default:  
                        return string.Empty;  
                        break;  
                }  
            }  
     
            /// <summary>  
            /// RemoveWhiteSpace: Removes space characters   
            /// </summary>  
            /// <param name="whitener">String to strip out</param>  
            /// <returns>cleaned string</returns>  
            private string RemoveWhiteSpace(string whitener)  
            {  
                StringBuilder _sb = new StringBuilder();  
                for (int i = 0; i < whitener.Length; i++)  
                {  
                    if (Char.Parse(whitener[i].ToString()) != 32) _sb.Append(whitener[i].ToString().ToLower());  
     
                }  
                return _sb.ToString();  
            }  
            private PageWidgetInfo FindWidget(int id)  
            {  
                foreach (PageWidgetInfo info in PageWidgets)  
                {  
                    if (info.ID == id) return info;  
                }  
                return null;  
            }  
              
            /// <summary>  
            /// Ajaxifies postback from RadDock Control  
            /// </summary>  
            /// <param name="dock"></param>  
            private void CreateSaveStateTrigger(RadDock dock)  
            {  
                dock.AutoPostBack = true;  
                dock.CommandsAutoPostBack = true;  
                AsyncPostBackTrigger saveStateTrigger = new AsyncPostBackTrigger();  
                saveStateTrigger.ControlID = dock.ID;  
                saveStateTrigger.EventName = "DockPositionChanged";  
                UpdatePanel1.Triggers.Add(saveStateTrigger);  
                saveStateTrigger = new AsyncPostBackTrigger();  
                saveStateTrigger.ControlID = dock.ID;  
                saveStateTrigger.EventName = "Command";  
                UpdatePanel1.Triggers.Add(saveStateTrigger);  
     
            }  
            /// <summary>  
            /// Adds Parts to Dock Zones  
            /// </summary>  
            /// <param name="dock">Dock to append to</param>  
            private void LoadWidget(RadDock dock)  
            {  
                if (string.IsNullOrEmpty(dock.Tag))  
                    return;  
                PageWidgetInfo _info = FindWidget(int.Parse(dock.ID));  
                Control _widget = LoadControl(_info.Path);  
                dock.ContentContainer.Controls.Add(_widget);  
                  
            }  


    and here is the .aspx (starting at the <body> tag)

    <body> 
    <form id="Main" runat="server">  
           <asp:ScriptManager ID="ScriptManager1" runat="server">  
              <Services> 
                        <asp:ServiceReference Path="AsyncServiceCalls.asmx" InlineScript="True" /> 
               </Services> 
           </asp:ScriptManager> 
           <radW:RadWindowManager ID="winMgr" runat="server" MinimizeZoneId="minZone" MinimizeMode="MinimizeZone" ></radW:RadWindowManager> 
             
           <telerik:RadDockLayout ID="widgetMgr" runat="server"   
                OnSaveDockLayout="widgetMgr_SaveDockLayout" StoreLayoutInViewState="False" EnableEmbeddedSkins="false"  Skin="StaticDock" > 
     
    <div id="site-container">  
    <!-- header --> 
    <span class="hide">Jazz Net</span> 
    <div id="header">  
        <div id="plane">  
            <href="FinalPortal.aspx"><img src="images/header/plane.gif" height="84" width="388"  alt="Jazz Net" /></a>  
        </div><!-- plane --> 
        <div id="logout-area">  
            <uc4:lang ID="Lang1" runat="server" /> 
              
        </div><!-- logout-area --> 
        <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /></div>  
              
        <div id="search-container">  
              
            <div id="search-area">  
                <uc3:search ID="Search1" runat="server" /> 
     
            </div><!-- search-area --> 
              
            <div id="company-directory">  
                <uc2:companydirectory ID="Companydirectory1" runat="server" /> 
                                 
     
            </div><!-- company-directory --> 
            <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /></div>  
              
        </div><!-- search-container --> 
        <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /></div>  
          
    </div><!-- header --> 
     
     
    <!-- nav --> 
    <div id="nav-container">  
        <div class="main-nav-left">  
            <uc1:mainnav ID="Mainnav1" runat="server" /> 
              
        </div><!-- main-nav-left --> 
          
        <div class="main-nav-right">  
            <div class="green-leaf"><img src="images/icons/green_16.gif" height="16" width="16"  alt=" " /></div>  
            <Comm:commMenu runat="server" ID="mCOmm" /> 
            <div class="nav-div"><img src="images/nav/div.gif" height="21" width="2" border="0" alt="" /></div>  
            <uc14:toolsnav id="Toolsnav1" runat="server"></uc14:toolsnav> 
            &nbsp;  
        </div><!-- main-nav-right --> 
        <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /></div>  
    </div><!-- nav-container --> 
     
        <div id="container">  
     
            <div id="left-col">  
            <!-- Current News Section --> 
                    <telerik:RadDockZone ID="minZone" runat="server" Width="100%" Height="100px" Skin="Mac" Visible="false">  
                      
                </telerik:RadDockZone> 
                <div class="left-block">  
          
                <telerik:RadDockZone ID="zoneNews" runat="server" CssClass="left-block" BorderStyle="None" Orientation="vertical" Width="95%" > 
                                <telerik:RadDock Title="Current News"  ID="dockNews" runat="server" DefaultCommands="ExpandCollapse" DockMode="Docked" 
                                    EnableDrag="False" Pinned="True" BorderStyle="None" EnableTheming="False" Height="100%" Width="100%" OnInit="dockNews_Init">  
                               <ContentTemplate> 
                                    <uc6:currentnewsletters ID="Currentnewsletters1" runat="server" /> 
                                    </ContentTemplate> 
                               </telerik:RadDock> 
                              
                             
                            </telerik:RadDockZone> 
                    
                      
                </div><!-- current news letters --> 
                <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /> 
                      
                    <br /></div>  
                <!-- Company Info Nav --> 
                <div class="left-block">  
                    <uc7:coinfonav ID="Coinfonav1" runat="server" /> 
                      
                      
                </div><!-- company info nav --> 
                <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                <!-- Bravo Section --> 
                <div class="left-block">  
                            <telerik:RadDockZone ID="zoneBravo" runat="server" CssClass="left-block" BorderStyle="None" > 
                                <telerik:RadDock Title="Submit a Bravo Suggestion"  ID="dockBravo" runat="server" DefaultCommands="ExpandCollapse" DockMode="Docked" 
                                    EnableDrag="False" Pinned="True" BorderStyle="None" EnableTheming="False" CssClass="left-block" OnInit="dockBravo_Init">  
                               <ContentTemplate> 
                                   <uc8:bravosuggestion ID="Bravosuggestion1" runat="server" /> 
                                   </ContentTemplate> 
                               </telerik:RadDock> 
                            </telerik:RadDockZone> 
                      
                </div><!-- bravo suggestions --> 
                <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                <!-- Our Stories Section --> 
                <div class="left-block-os">  
                            <telerik:RadDockZone ID="zoneStories" runat="server" CssClass="left-block-os" BorderStyle="None" > 
                                <telerik:RadDock Title="Our Stories"  ID="dockStories" runat="server" DefaultCommands="ExpandCollapse" DockMode="Docked" 
                                    EnableDrag="False" Pinned="True" BorderStyle="None" EnableTheming="False" CssClass="left-block-os" OnInit="dockStories_Init">  
                               <ContentTemplate> 
                                 <uc9:ourstories ID="Ourstories1" runat="server" />    
                                 </ContentTemplate> 
                               </telerik:RadDock> 
                            </telerik:RadDockZone> 
                      
                      
                      
                </div><!-- our stories --> 
                <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                <!-- parts, left col --> 
                <asp:LinkButton ID="lbShow" runat="server" OnClick="lbShow_Click" OnClientClick="FlipView();">Advanced View</asp:LinkButton> 
                <telerik:RadToolTip ID="tipView" runat="server" ManualClose="True" RelativeTo="Element" 
                    Skin="Vista" TargetControlID="lbShow" Font-Names="Arial Narrow" Font-Size="Small" Position="BottomRight" Sticky="True">  
                </telerik:RadToolTip> 
                <br /> 
                <div runat="server" id="personalize" style="display:none;">  
                 Select Module:  
                 <br /> 
                <asp:DropDownList ID="DroptDownWidget" runat="server" Width="85%"></asp:DropDownList> 
                Select Docking Zone:  
                 <br /> 
                <asp:DropDownList ID="DropDownZone" runat="server" Width="85%">  
                <asp:ListItem Selected="true" Text="Center Zone" Value="zoneCenter"></asp:ListItem> 
                <asp:ListItem Text="Left Zone" Value="zoneLeft"></asp:ListItem> 
                <asp:ListItem Text="Right Zone" Value="zoneRight"></asp:ListItem> 
                 </asp:DropDownList> 
                <asp:Button ID="addDock" runat="server" Text="Add New Dock" OnClick="addDock_Click" /> 
                </div> 
                <telerik:RadDockZone ID="zoneLeft" runat="server" Width="100%" Visible="false"></telerik:RadDockZone> 
            </div><!-- left-col --> 
     
            <div id="center-col">  
                <div class="center-block">  
                
                    <div class="grey-bar"></div> 
                    <div class="center-col-pad">  
                          <uc10:userwelcome ID="Userwelcome1" runat="server" /> 
                        <br /> 
                          
                            <telerik:RadDockZone ID="zoneEmployeeNews" runat="server" CssClass="center-col-pad" BorderStyle="None" > 
                                <telerik:RadDock ID="dockEmployeeNews" runat="server" BorderStyle="none" DefaultCommands="ExpandCollapse" 
                                    DockMode="Docked" EnableDrag="False" OnInit="dockEmployeeNews_Init" Pinned="True" 
                                     Title="Employee News">  
                                       
                               <ContentTemplate> 
                                 <uc11:news ID="News1" runat="server" /> 
                                 </ContentTemplate> 
                               </telerik:RadDock> 
                            </telerik:RadDockZone> 
                              
                        <br /> 
                          
                    </div><!-- center-col-pad --> 
                </div><!-- Employee News --> 
                  
                <div class="center-block">  
                    <div class="grey-bar"></div> 
                    <div class="center-col-pad">  
                            <telerik:RadDockZone ID="zonePhotoOfTheWeek" runat="server" CssClass="center-col-pad" BorderStyle="None" > 
                                <telerik:RadDock  ID="dockPhotoOfTheWeek" runat="server" DefaultCommands="ExpandCollapse" DockMode="Docked" 
                                    EnableDrag="False" Pinned="True"  Title="Photo of the Week" OnInit="dockPhotoOfTheWeek_Init">  
                               <ContentTemplate> 
                                   <uc12:photooftheweek ID="Photooftheweek1" runat="server" /> 
                                   </ContentTemplate> 
                               </telerik:RadDock> 
                            </telerik:RadDockZone> 
                    </div><!-- center-col-pad --> 
                </div><!-- Photo of The Week --> 
                  
                  
                <telerik:RadDockZone ID="zoneCenter" runat="server" Width="100%" Visible="False"></telerik:RadDockZone> 
               <div id="vision"><uc13:visionandvalues ID="Visionandvalues1" runat="server" /> 
                </div> 
                  
            </div><!-- center-col --> 
     
            <div id="right-col">  
                <div id="safety-block">  
                    <div class="dark-grey-bar"></div> 
                    <span class="title">Safety</span><br /> 
                      
                    <div class="center">  
                        <div id="actual">.37<br /> 
                        <span class="small-txt">Actual</span></div>  
                        <div id="gauge"><img src="images/rightcol/safety/gauge.gif" height="27" width="53"  alt=" " /></div>  
                        <div id="prev-year">.40<br /> 
                        <span class="small-txt">2006</span></div>  
                        <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                    </div><!-- center --> 
                                      
                </div><!-- safety-block --> 
                  
                <div id="ensemble-block">  
                    <div class="dark-grey-bar"></div> 
                    <telerik:RadDockZone ID="zoneEnsemble" runat="server" BorderStyle="None" > 
                                <telerik:RadDock Title="Jazz Ensemble Indicators"  ID="dockEnsemble" runat="server" DefaultCommands="ExpandCollapse" DockMode="Docked" 
                                    EnableDrag="False" Pinned="True" BorderStyle="None" EnableTheming="False" CssClass="left-block-os" OnInit="dockEnsemble_Init">  
                               <ContentTemplate> 
                                            <span class="title">Jazz Ensemble Indicators:&nbsp; <span class="je-date">20/6/07</span></span><br /> 
                                  
                    <div class="ensemble-box">  
                        <div class="ensemble-border">  
                            <div class="ensemble-inner-border">  
                                <div class="ensemble-pad">  
                                    <div class="graph"><img src="images/rightcol/ensemble/graph.gif" height="36" width="59"  alt="Graph" /><br /></div>  
                                    <div class="je-numbers">  
                                        <div class="actual">78</div> 
                                        <img src="images/rightcol/ensemble/actual.gif" height="5" width="34"  alt="Actual" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="je-numbers">  
                                        <div class="target">75</div> 
                                        <img src="images/rightcol/ensemble/target.gif" height="5" width="34"  alt="Target" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="je-numbers">  
                                        <div class="mtd">.37</div> 
                                        <img src="images/rightcol/ensemble/mtd.gif" height="5" width="17"  alt="MTD" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                                </div><!-- ensemble-pad --> 
                                <div class="ensemble-title"><img src="images/rightcol/ensemble/control_otp.gif" height="5" width="89"  alt="Controllable OTP" /><br /></div>  
                              
                            </div><!-- ensemble-inner-border --> 
                              
                        </div><!-- ensemble-border --> 
                        <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                    </div><!-- ensemble-box --> 
                      
                    <div class="ensemble-box">  
                        <div class="ensemble-border">  
                            <div class="ensemble-inner-border">  
                                <div class="ensemble-pad">  
                                    <div class="graph"><img src="images/rightcol/ensemble/graph.gif" height="36" width="59"  alt="Graph" /><br /></div>  
                                    <div class="je-numbers">  
                                        <div class="actual">80</div> 
                                        <img src="images/rightcol/ensemble/actual.gif" height="5" width="34"  alt="Actual" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="je-numbers">  
                                        <div class="target">79</div> 
                                        <img src="images/rightcol/ensemble/target.gif" height="5" width="34"  alt="Target" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="je-numbers">  
                                        <div class="mtd">.37</div> 
                                        <img src="images/rightcol/ensemble/mtd.gif" height="5" width="17"  alt="MTD" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                                </div><!-- ensemble-pad --> 
                                <div class="ensemble-title"><img src="images/rightcol/ensemble/flight_completion.gif" height="5" width="159"  alt="Controllable Flight Completion" /><br /></div>  
                              
                            </div><!-- ensemble-inner-border --> 
                              
                        </div><!-- ensemble-border --> 
                        <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                    </div><!-- ensemble-box --> 
                      
                    <div class="ensemble-box">  
                        <div class="ensemble-border">  
                            <div class="ensemble-inner-border">  
                                <div class="ensemble-pad">  
                                    <div class="graph"><img src="images/rightcol/ensemble/graph.gif" height="36" width="59"  alt="Graph" /><br /></div>  
                                    <div class="je-numbers">  
                                        <div class="actual">65</div> 
                                        <img src="images/rightcol/ensemble/actual.gif" height="5" width="34"  alt="Actual" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="je-numbers">  
                                        <div class="target">72</div> 
                                        <img src="images/rightcol/ensemble/target.gif" height="5" width="34"  alt="Target" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="je-numbers">  
                                        <div class="mtd">.37</div> 
                                        <img src="images/rightcol/ensemble/mtd.gif" height="5" width="17"  alt="MTD" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                                </div><!-- ensemble-pad --> 
                                <div class="ensemble-title"><img src="images/rightcol/ensemble/pawobs.gif" height="5" width="37"  alt="PAWOBs" /><br /></div>  
                              
                            </div><!-- ensemble-inner-border --> 
                              
                        </div><!-- ensemble-border --> 
                        <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                    </div><!-- ensemble-box --> 
                      
                    <div class="ensemble-box">  
                        <div class="ensemble-border">  
                            <div class="ensemble-inner-border">  
                                <div class="ensemble-pad">  
                                    <div class="graph"><img src="images/rightcol/ensemble/graph.gif" height="36" width="59"  alt="Graph" /><br /></div>  
                                    <div class="je-numbers">  
                                        <div class="actual">65</div> 
                                        <img src="images/rightcol/ensemble/actual.gif" height="5" width="34"  alt="Actual" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="je-numbers">  
                                        <div class="target">72</div> 
                                        <img src="images/rightcol/ensemble/target.gif" height="5" width="34"  alt="Target" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="je-numbers">  
                                        <div class="mtd">.37</div> 
                                        <img src="images/rightcol/ensemble/mtd.gif" height="5" width="17"  alt="MTD" /><br /> 
                                    </div><!-- je-numbers --> 
                                    <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                                </div><!-- ensemble-pad --> 
                                <div class="ensemble-title"><img src="images/rightcol/ensemble/cust_sat.gif" height="5" width="113"  alt="Customer Satisfaction" /><br /></div>  
                              
                            </div><!-- ensemble-inner-border --> 
                              
                        </div><!-- ensemble-border --> 
                        <div class="clear"><img src="images/dot.gif" height="1" width="1"  alt=" " /><br /></div>  
                    </div><!-- ensemble-box --> 
                      
                               
                                    </ContentTemplate> 
                               </telerik:RadDock> 
                            </telerik:RadDockZone> 
              
                </div><!-- ensemble-block --> 
                  
                <telerik:RadDockZone ID="zoneRight" runat="server" Width="100%" Visible="False"></telerik:RadDockZone> 
                  
                  
                  
            </div><!-- right-col --> 
            <div class="clear">&nbsp;</div> 
              
              
              
        </div><!-- container --> 
          
    <!-- footer --> 
    <div id="footer-nav">  
        <uc5:footer ID="Footer1" runat="server" /> 
          
    </div><!-- footer-nav --> 
     
    <div id="copyright">  
        &copy; Copyright 2007 Jazz Air LP<br /> 
        <href="#">legal disclaimer</a> 
    </div><!-- copyright --> 
     
          
    </div><!-- site-container --> 
               <div style="display: none;">  
                   <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
                       <Triggers> 
                           <asp:AsyncPostBackTrigger ControlID="addDock" EventName="Click" /> 
                       </Triggers> 
                   </asp:UpdatePanel> 
               </div> 
     </telerik:RadDockLayout> 
    </form> 
    </body> 
     

  4. Jeff Trudel
    Jeff Trudel avatar
    4 posts
    Member since:
    Feb 2007

    Posted 02 Jul 2007 Link to this post

    Valeri,
    Have you had a chance to review?
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 03 Jul 2007 Link to this post

    Hi Jeff,

    I checked your code, but it contains a lot of missing elements: user controls and code-behind. I removed the user control references and some of the missing code-behind declarations, but I need the lbShow_Click method in order to switch the page to Advanced mode...

    Best wishes,
    Valeri Hristov (Senior Developer, MCSD)
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Jeff Trudel
    Jeff Trudel avatar
    4 posts
    Member since:
    Feb 2007

    Posted 03 Jul 2007 Link to this post

    I left out the  user controls becuase they do not seem to be the issue.  If I create a new user control that only has the word "Hello", the problem still exists.
    Here is the lblShow_Click Code:

    protected void lbShow_Click(object sender, EventArgs e)

    {

    if (((LinkButton)sender).Text.Equals("Advanced View"))

    {

    this.personalize.Attributes.Clear();

    this.personalize.Attributes.Add("display", "inline");

    this.zoneLeft.Visible = true;

    this.zoneRight.Visible = true;

    this.zoneCenter.Visible = true;

    this.minZone.Visible = true;

    this.lbShow.Text = "Basic View";

    }

    else

    {

    //this.personalize.Attributes.Clear();

    //this.personalize.Attributes.Add("display", "none");

    this.zoneLeft.Visible = false;

    this.zoneRight.Visible = false;

    this.zoneCenter.Visible = false;

    this.minZone.Visible = false;

    this.lbShow.Text = "Advanced View";

    }

    }

    and the Javascript function Flip_View() it refers to:

    <script language="javascript" type="text/javascript">

     

    function FlipView()

    {

    if(document.getElementById('personalize').style.display = 'none')

    {

    document.getElementById('personalize').style.display = '';

    }

    else

     

    {

    document.getElementById('personalize').style.display = 'none';

    }

    }

    </script>

    Please note, I have disabled this functionality and the problem still exists. 
    The control and dock seem to add to the UpdatePanel, it's the Javascript functions that move the dock to the zone, handle the DockPositionChanged event, and the Close event, that are throwing up the error.  The event handler for SaveDockLayout (widgetMgr_SaveDockLayout) also works fine. 

  7. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 03 Jul 2007 Link to this post

    Hello Jeff Trudel,

    It seems to work correctly, at least the attached example, which I am using. Generally, this is your page, inside our original PortalSite example, with the original database. I only removed the code which prevented the site from compiling and added the code-behind and the javascript function from your last post. I am using the latest versions of RadWindow and Telerik.Web.UI. What am I missing?

    Greetings,
    Valeri Hristov (Senior Developer, MCSD)
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top