RadMenu is stripping __doPostback from buttons

2 posts, 0 answers
  1. Stuart Watton
    Stuart Watton avatar
    18 posts
    Member since:
    Sep 2009

    Posted 15 Dec 2009 Link to this post

    Hi,

    I have a user control that contains a RadMenu that is populated from the users permissions in the code behind.

    the ascx control is very simple and looks like this
    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="Menu.ascx.vb" Inherits="Controls_Menu" %> 
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
    <style type="text/css">  
        .RadMenu_Simple  
        {  
            width: 100%;  
        }  
    </style> 
     
    <div id="divMenu" style="position: fixed; top: 0px; left: 0px; height: 26px; width: 100%;  
        z-index: 10001000;"> 
           <telerik:RadMenu ID="tmuMenu" runat="server" Skin="Simple" ClickToOpen="true" Width="100%" 
                Style="z-index: 1001000" RegisterWithScriptManager="false">  
            </telerik:RadMenu> 
    </div> 

    The Menu sits in a div to ensure that it is always at the top of the pane even if the pane is scrolled.

    The page sits inside a pane of a RadSplitter.

    On most pages this works fine and the buttons on the page fire, but for some the control is stripping out the on click for the buttons. The pages used to use a different menuing technique and I am changein every page of the system to use the new Menu user control.

    The rendered page looks as follows (I have reduced most of the menu items for brevity)

    <div id="divMenu" style="position: fixed; top: 0px; left: 0px; height: 26px; width: 100%;  
        z-index: 10001000;"> 
            <input type="hidden"/>  
    <script src="/Oper8/ScriptResource.axd?d=GiHDpx3Edvlp530KVXGWp5ALxOE0Ls5RydtpO73IdXWBNOXj09gi37oI7k__7quR0&amp;t=ffffffffecf21e5b" type="text/javascript"></script> 
    <script src="/Oper8/ScriptResource.axd?d=GiHDpx3Edvlp530KVXGWp5ALxOE0Ls5RydtpO73IdXX9I-GQWD9MnriVZhlsVcpgQaTfODvIb3AG-9pkvJfD2w2&amp;t=ffffffffecf21e5b" type="text/javascript"></script> 
    <script src="/Oper8/ScriptResource.axd?d=GiHDpx3Edvlp530KVXGWp5ALxOE0Ls5RydtpO73IdXXOKb8CUsIvjrIkhh_rBgPXy7D911nsMGrakc99_PV95g2&amp;t=ffffffffecf21e5b" type="text/javascript"></script> 
    <script src="/Oper8/ScriptResource.axd?d=GiHDpx3Edvlp530KVXGWp5ALxOE0Ls5RydtpO73IdXU0VoPWJ2SI4SIgu7KssGH7rOknreQV7ToEwXhvapfXfFyzJx57mp9hh20sCVlwbRs1&amp;t=ffffffffecf21e5b" type="text/javascript"></script> 
    <script src="/Oper8/ScriptResource.axd?d=GiHDpx3Edvlp530KVXGWp5ALxOE0Ls5RydtpO73IdXWGDYDAQCB-8MYRFupHbBu8kOT8PnpZ6GC8-yU7n7l514oWrAg7kaKICNurZYzPhbY1&amp;t=ffffffffecf21e5b" type="text/javascript"></script> 
    <script src="/Oper8/ScriptResource.axd?d=GiHDpx3Edvlp530KVXGWp9dP_q-NBdO-uMRKggGPBSN2VYIjP5M3RGU45vAq7TDO8JhfG6GBjKpijAPPun0ZQw2&amp;t=ffffffffecf21e5b" type="text/javascript"></script> 
    <div id="UserMenu_tmuMenu" class="RadMenu RadMenu_Simple rmSized" style="width:100%;z-index: 1001000">  
        <ul class="rmHorizontal rmRootGroup">  
            <li class="rmItem rmFirst"><href="#" class="rmLink"><span class="rmText">Daily</span></a><div class="rmSlide">  
                <ul class="rmVertical rmGroup rmLevel1">  
                    <li class="rmItem rmFirst"><href="DayBuytoList.aspx" class="rmLink"><span class="rmText">Work-to</span></a></li><li class="rmItem "><href="Expedite.aspx" class="rmLink"><span class="rmText">Expedite</span></a></li><li class="rmItem "><href="DayRefresh.aspx" class="rmLink"><span class="rmText">Daily Refresh</span></a></li><li class="rmItem "><href="UnAttendedLog.aspx" class="rmLink"><span class="rmText">Import Log</span></a></li><li class="rmItem "><href="NoTargets.aspx" class="rmLink"><span class="rmText">No Targets</span></a></li><li class="rmItem "><href="PartAnalysis.aspx" class="rmLink"><span class="rmText">Part Analysis</span></a></li><li class="rmItem "><href="PartPlans.aspx" class="rmLink"><span class="rmText">Part Plan</span></a></li><li class="rmItem "><href="Editwt005.aspx" class="rmLink"><span class="rmText">Live Open PO's</span></a></li><li class="rmItem "><href="Editwt007.aspx" class="rmLink"><span class="rmText">Live Open SO's</span></a></li><li class="rmItem rmLast"><href="StockStatus.aspx" class="rmLink"><span class="rmText">Stock Status</span></a></li> 
                </ul> 
            </div></li><li class="rmItem "><href="#" class="rmLink"><span class="rmText">Import</span></a><div class="rmSlide">  
                <ul class="rmVertical rmGroup rmLevel1">  
                    <li class="rmItem rmFirst"><href="RawImport.aspx" class="rmLink"><span class="rmText">RAW Import</span></a></li><li class="rmItem "><href="ValidateRAW.aspx" class="rmLink"><span class="rmText">Validate</span></a></li><li class="rmItem "><href="MthBuildDemands.aspx" class="rmLink"><span class="rmText">Build Demand</span></a></li><li class="rmItem "><href="CombineCustomers.aspx" class="rmLink"><span class="rmText">Combine Demand</span></a></li><li class="rmItem rmLast"><href="ImportVVA.aspx" class="rmLink"><span class="rmText">Import VVA</span></a></li> 
                </ul> 
            </div></li><li class="rmItem "><href="#" class="rmLink"><span class="rmText">S&OP</span></a><div class="rmSlide">  
                <ul class="rmVertical rmGroup rmLevel1">  
                    <li class="rmItem rmFirst"><href="#" class="rmLink"><span class="rmText">Planning</span></a><div class="rmSlide">  
                        <ul class="rmVertical rmGroup rmLevel2">  
                            <li class="rmItem rmFirst"><href="MthRefresh.aspx" class="rmLink"><span class="rmText">Refresh</span></a></li><li class="rmItem "><href="MthShowAnalysis.aspx" class="rmLink"><span class="rmText">Targets</span></a></li><li class="rmItem "><href="SOPTargetMovement.aspx" class="rmLink"><span class="rmText">Target Movement</span></a></li><li class="rmItem "><href="SOPDemandTrends.aspx" class="rmLink"><span class="rmText">Demand Trends</span></a></li><li class="rmItem "><href="AlternativePart.aspx" class="rmLink"><span class="rmText">Substitute Parts</span></a></li><li class="rmItem "><href="PhaseIn.aspx" class="rmLink"><span class="rmText">Phase In</span></a></li><li class="rmItem "><href="PhaseOut.aspx" class="rmLink"><span class="rmText">Phase Out</span></a></li><li class="rmItem "><href="Promotions.aspx" class="rmLink"><span class="rmText">Promotions</span></a></li><li class="rmItem "><href="PhaseInParts.aspx" class="rmLink"><span class="rmText">Lifecycle</span></a></li><li class="rmItem "><href="CurrentTargetsKanbans.aspx" class="rmLink"><span class="rmText">Current Targets</span></a></li><li class="rmItem "><href="Capacity.aspx" class="rmLink"><span class="rmText">Capacity</span></a></li><li class="rmItem "><href="Forecasts.aspx" class="rmLink"><span class="rmText">Forecasts</span></a></li><li class="rmItem "><href="FEPBuildCube.aspx" class="rmLink"><span class="rmText">FEP Build Cube</span></a></li><li class="rmItem "><href="FEPResults.aspx" class="rmLink"><span class="rmText">FEP Results</span></a></li><li class="rmItem rmLast"><href="FEPSavedResults.aspx" class="rmLink"><span class="rmText">FEP Saved Results</span></a></li> 
                        </ul> 
                    </div></li><li class="rmItem rmLast"><href="#" class="rmLink"><span class="rmText">Analysis</span></a><div class="rmSlide">  
                        <ul class="rmVertical rmGroup rmLevel2">  
                            <li class="rmItem rmFirst"><href="StockDiscrepancies.aspx" class="rmLink"><span class="rmText">Stock Discrepancies</span></a></li><li class="rmItem "><href="SOPReportsMulti.aspx" class="rmLink"><span class="rmText">S&OP Reports</span></a></li><li class="rmItem "><href="SOPSchedule.aspx" class="rmLink"><span class="rmText">S&OP Schedule</span></a></li><li class="rmItem "><href="RuleSeasonality.aspx" class="rmLink"><span class="rmText">Seasonality</span></a></li><li class="rmItem "><href="ABCAnalysis.aspx" class="rmLink"><span class="rmText">ABC Analysis</span></a></li><li class="rmItem rmLast"><href="FamilySplit.aspx" class="rmLink"><span class="rmText">Family % Split</span></a></li> 
                        </ul> 
                    </div></li>  
                </ul> 
            </div></li><li class="rmItem rmLast"><href="#" class="rmLink"><span class="rmText">Module</span></a><div class="rmSlide">  
                <ul class="rmVertical rmGroup rmLevel1">  
                    <li class="rmItem rmFirst"><href="Redirector.aspx?System=Collabor8" class="rmLink"><span class="rmText">Collabor8</span></a></li><li class="rmItem rmLast"><href="Redirector.aspx?System=Communic8" class="rmLink"><span class="rmText">Communic8</span></a></li> 
                </ul> 
            </div></li>  
        </ul><input id="UserMenu_tmuMenu_ClientState" name="UserMenu_tmuMenu_ClientState" type="hidden" /> 
    </div><script type="text/javascript">  
    //<![CDATA[ 
        Sys.Application.add_init(function(){$create(Telerik.Web.UI.RadMenu, {"_childListElementCssClass":null,"_skin":"Simple","attributes":{},"clickToOpen":true,"clientStateFieldID":"UserMenu_tmuMenu_ClientState","collapseAnimation":"{\"duration\":450}","expandAnimation":"{\"duration\":450}","itemData":[{"items":[{"navigateUrl":"~/DayBuytoList.aspx"},{"navigateUrl":"~/Expedite.aspx"},{"navigateUrl":"~/DayRefresh.aspx"},{"navigateUrl":"~/UnAttendedLog.aspx"},{"navigateUrl":"~/NoTargets.aspx"},{"navigateUrl":"~/PartAnalysis.aspx"},{"navigateUrl":"~/PartPlans.aspx"},{"navigateUrl":"~/Editwt005.aspx"},{"navigateUrl":"~/Editwt007.aspx"},{"navigateUrl":"~/StockStatus.aspx"}]},{"items":[{"navigateUrl":"~/RawImport.aspx"},{"navigateUrl":"~/ValidateRAW.aspx"},{"navigateUrl":"~/MthBuildDemands.aspx"},{"navigateUrl":"~/CombineCustomers.aspx"},{"navigateUrl":"~/ImportVVA.aspx"}]},{"items":[{"items":[{"navigateUrl":"~/MthRefresh.aspx"},{"navigateUrl":"~/MthShowAnalysis.aspx"},{"navigateUrl":"~/SOPTargetMovement.aspx"},{"navigateUrl":"~/SOPDemandTrends.aspx"},{"navigateUrl":"~/AlternativePart.aspx"},{"navigateUrl":"~/PhaseIn.aspx"},{"navigateUrl":"~/PhaseOut.aspx"},{"navigateUrl":"~/Promotions.aspx"},{"navigateUrl":"~/PhaseInParts.aspx"},{"navigateUrl":"~/CurrentTargetsKanbans.aspx"},{"navigateUrl":"~/Capacity.aspx"},{"navigateUrl":"~/Forecasts.aspx"},{"navigateUrl":"~/FEPBuildCube.aspx"},{"navigateUrl":"~/FEPResults.aspx"},{"navigateUrl":"~/FEPSavedResults.aspx"}]},{"items":[{"navigateUrl":"~/StockDiscrepancies.aspx"},{"navigateUrl":"~/SOPReportsMulti.aspx"},{"navigateUrl":"~/SOPSchedule.aspx"},{"navigateUrl":"~/RuleSeasonality.aspx"},{"navigateUrl":"~/ABCAnalysis.aspx"},{"navigateUrl":"~/FamilySplit.aspx"}]}]},{"items":[{"items":[{"navigateUrl":"~/Editwt001.aspx"},{"navigateUrl":"~/Editwt002.aspx"},{"navigateUrl":"~/Editwt003.aspx"},{"navigateUrl":"~/Editwt004.aspx"},{"navigateUrl":"~/Editwt004b.aspx"},{"items":[{"navigateUrl":"~/Editwt005.aspx"},{"navigateUrl":"~/Editwt007.aspx"},{"navigateUrl":"~/Editwt006.aspx"}]},{"items":[{"navigateUrl":"~/Editwt009.aspx"},{"navigateUrl":"~/Editwt010.aspx"},{"navigateUrl":"~/Editwt011.aspx"}]},{"navigateUrl":"~/Editwt008.aspx"},{"navigateUrl":"~/Editwt004a.aspx"}]},{"items":[{"navigateUrl":"~/Editit001.aspx"},{"navigateUrl":"~/Editit002.aspx"},{"navigateUrl":"~/Editit003.aspx"},{"navigateUrl":"~/Editit004.aspx"},{"navigateUrl":"~/Editit004b.aspx"},{"items":[{"navigateUrl":"~/Editit005.aspx"},{"navigateUrl":"~/Editit007.aspx"},{"navigateUrl":"~/Editit006.aspx"}]},{"items":[{"navigateUrl":"~/Editit009.aspx"},{"navigateUrl":"~/Editit010.aspx"},{"navigateUrl":"~/Editit011.aspx"}]},{"navigateUrl":"~/Editit008.aspx"},{"navigateUrl":"~/Editit004a.aspx"}]},{"items":[{"navigateUrl":"~/EditRAW001.aspx"},{"navigateUrl":"~/EditRAW002.aspx"},{"navigateUrl":"~/EditRAW003.aspx"},{"navigateUrl":"~/EditRAW004.aspx"},{"navigateUrl":"~/EditRAW004b.aspx"},{"items":[{"navigateUrl":"~/EditRAW005.aspx"},{"navigateUrl":"~/EditRAW007.aspx"},{"navigateUrl":"~/EditRAW006.aspx"}]},{"items":[{"navigateUrl":"~/EditRAW009.aspx"},{"navigateUrl":"~/EditRAW010.aspx"},{"navigateUrl":"~/EditRAW011.aspx"}]},{"navigateUrl":"~/EditRAW008.aspx"},{"navigateUrl":"~/EditRAW004a.aspx"}]}]},{"items":[{"navigateUrl":"~/SimImport.aspx"},{"navigateUrl":"~/MthO8Curves.aspx"},{"navigateUrl":"~/MthShowVVA.aspx"},{"navigateUrl":"~/PartSimulation.aspx"},{"navigateUrl":"~/GroupSimulation.aspx"},{"navigateUrl":"~/Scenarios.aspx?Readonly=1"},{"navigateUrl":"~/ForwardSimulation.aspx"},{"navigateUrl":"~/ForwardScenarios.aspx?Readonly=1"},{"items":[{"navigateUrl":"~/ForwardSimCapacity.aspx"},{"navigateUrl":"~/GroupSimCapacity.aspx"}]}]},{"items":[{"items":[{"navigateUrl":"~/CustomerPartTypeInfo.aspx"},{"navigateUrl":"~/PTCConfiguration.aspx"},{"navigateUrl":"~/Shutdown.aspx"},{"navigateUrl":"~/ChangeSupplierByItem.aspx"},{"navigateUrl":"~/CustomerInfo.aspx"},{"navigateUrl":"~/MthBuildCalender.aspx"},{"navigateUrl":"~/CustShutdown.aspx"},{"navigateUrl":"~/NodeInfo.aspx"},{"navigateUrl":"~/ReasonCodes.aspx"}]},{"items":[{"navigateUrl":"~/PartStatus.aspx"},{"navigateUrl":"~/ReviewParts.aspx"},{"navigateUrl":"~/DualSourced.aspx"},{"navigateUrl":"~/ContainerQty.aspx"},{"navigateUrl":"~/WorkCentres.aspx"},{"navigateUrl":"~/Routing.aspx"},{"navigateUrl":"~/SpecifyPTC.aspx"},{"navigateUrl":"~/FEPTemplates.aspx"}]},{"items":[{"navigateUrl":"~/SupplementaryParts.aspx"},{"navigateUrl":"~/SupplementaryBOM.aspx"},{"navigateUrl":"~/SupplementaryRoutings.aspx"},{"navigateUrl":"~/SupplementaryWorkCentres.aspx"}]}]},{"items":[{"navigateUrl":"~/SetVVARules.aspx"},{"navigateUrl":"~/SetRateRules.aspx"},{"navigateUrl":"~/SetROCRules.aspx"},{"navigateUrl":"~/SetVolumeRules.aspx"},{"navigateUrl":"~/SetValueRules.aspx"},{"navigateUrl":"~/SetMTORules.aspx"},{"navigateUrl":"~/RuleManagement.aspx"},{"navigateUrl":"~/SetFEPRules.aspx"}]},{"items":[{"navigateUrl":"~/ArchiveDayBuytoList.aspx"},{"navigateUrl":"~/ArchiveTargetsKanbans.aspx"},{"navigateUrl":"~/ArchiveRateBasedSchedule.aspx"},{"navigateUrl":"~/ArchiveExpedite.aspx"},{"navigateUrl":"~/ArchiveInv1.aspx"},{"navigateUrl":"~/ArchiveFore.aspx"},{"navigateUrl":"~/ArchiveFEP.aspx"},{"navigateUrl":"~/MyRecentReports.aspx"}]},{"items":[{"navigateUrl":"~/Redirector.aspx?System=Collabor8"},{"navigateUrl":"~/Redirector.aspx?System=Communic8"}]}]}, null, null, $get("UserMenu_tmuMenu"));});
    //]]> 
    </script> 
     
    </div> 
     
     
        <div id="divMainContainer" style="position: absolute; top: 20px">  
            <span style="color:White;z-index: 127; left: 174px; position: absolute;  
                top: 230px"><input id="cbActive" type="checkbox" name="cbActive" checked="checked" onclick="javascript:setTimeout('__doPostBack(\'cbActive\',\'\')', 0)" tabindex="9" /></span>  
            <span id="Label6" style="font-family:Arial;font-size:12px;z-index: 126; left: 42px; position: absolute; top: 232px;  
                width: 127px;">Active Suppliers Only</span> 
            <input type="image" name="ImageButton1" id="ImageButton1" src="Images/HelpIcon32.gif" style="height:23px;width:25px;border-width:0px;z-index: 125; left: 786px; position: absolute;  
                top: 36px" /> 
            <span id="Label5" style="font-family:Arial;font-size:12px;z-index: 124; left: 616px; position: absolute; top: 125px;  
                width: 132px;">Append Import Tables</span> 
            <span style="color:White;z-index: 123; left: 752px; position: absolute;  
                top: 123px"><input id="cbAppend" type="checkbox" name="cbAppend" tabindex="9" /></span>  
            <img id="Image1" src="images/validate.gif" style="border-width:0px;z-index: 101; left: 31px; position: absolute; top: 27px" /> 
            <input type="submit" name="Button5" value="SQL" id="Button5" title="SQL Command Line" style="height:28px;width:86px;z-index: 102; left: 690px; position: absolute; top: 77px" /> 
            <input type="submit" name="Button4" value="Import" id="Button4" tabindex="11" title="Import the Valid Records from the RAW Table to the Import Tables" style="height:31px;width:104px;z-index: 103; left: 560px; position: absolute; top: 32px" /> 
            <span id="Label4" style="font-family:Arial;font-size:12px;z-index: 104; left: 648px; position: absolute; top: 211px;  
                width: 90px;">Record Count</span> 
            <input name="txtSupplierName" type="text" value="All Supplier Codes Selected" readonly="readonly" id="txtSupplierName" tabindex="2" style="background-color:White;width:311px;z-index: 105; left: 354px; position: absolute;  
                top: 90px" /> 
            <select name="ddlSupplierCode" onchange="javascript:setTimeout('__doPostBack(\'ddlSupplierCode\',\'\')', 0)" id="ddlSupplierCode" tabindex="6" style="background-color:#F9D295;width:168px;z-index: 106; left: 179px; position: absolute;  
                top: 91px"> 
        <option selected="selected" value="All">All</option> 
        <option value="Company A">COMPANY A</option> 

    As you can see some things like the dropDownList and and the checkBox have __doPostBack events attached but the buttons (e.g Button5 and Button4) no longer do. Before implementing the RadMenu these used to fire without a problem

    Does anybody have any idea what is causing this.

    As I say this only seems to happen on some pages and most pages generate the HTML with the  required __doPostBack.

  2. Stuart Watton
    Stuart Watton avatar
    18 posts
    Member since:
    Sep 2009

    Posted 16 Dec 2009 Link to this post

    I found the issue and it had nothing to do with the radMenu but the way the docType change from transitional to strict affected how the unsubmit of the the form was working.
Back to Top