RadContextMenu not firing Ajax Modal Popup Extender

2 posts, 0 answers
  1. Paul
    Paul avatar
    6 posts
    Member since:
    Sep 2018

    Posted 19 Feb 2019 Link to this post


    I have a split button and RadContextMenu, however for the life of me cannot get the MPE to fire from the Context items and its driving me up the wall. Can anyone please help point me in the right direction.

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShowModal.aspx.cs"
        Inherits="Default" %>
    <%@ Register Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <telerik:RadButton EnableSplitButton="true" ID="btnPOSplitBtn" runat="server" Text="Search"
            <telerik:RadContextMenu ID="POActionsMenu" runat="server" OnItemClick="POActionsMenu_ItemClick">
                    <telerik:RadMenuItem Text="Export CSV" Value="3">
                    <telerik:RadMenuItem Text="Change Status to Printed" Value="4">
                    <telerik:RadMenuItem Text="Delete Purchase Order" Value="5">
            <%-- Alert Box --%>
            <asp:LinkButton ID="lnkConfirm" runat="server"></asp:LinkButton>
            <AjaxControlToolkit:ModalPopupExtender ID="mpeConfirm" runat="server" DropShadow="false" PopupControlID="pnlConfirm" TargetControlID="lnkConfirm" BackgroundCssClass="modalBackground" BehaviorID="Confirmations" CancelControlID="btnCloseConfirm">
            <asp:Panel ID="pnlConfirm" runat="server" CssClass="modalPopup" Style="display: none; width: 80%; max-height: 80%; overflow-y: auto;">
                <h2>Are you sure?</h2>
                    <asp:Label ID="lblConfirmAlert" runat="server"></asp:Label>
                <telerik:RadButton ID="btnConfirmClose" runat="server" Text="No - Close" UseSubmitBehavior="false" />
            <telerik:RadScriptBlock runat="server">
                <script type="text/javascript">
                    function OnClientClicked(sender, args) {
                        if (args.IsSplitButtonClick()) {
                            var currentLocation = $telerik.getLocation(sender.get_element());
                            var contextMenu = $find("<%=POActionsMenu.ClientID%>");
                            contextMenu.showAt(currentLocation.x + 75, currentLocation.y + 32);
                        else {


    and my code behind.

    using System;
    using Telerik.Web.UI;
    public partial class Default : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)
        protected void POActionsMenu_ItemClick(object sender, RadMenuEventArgs e)
            RadContextMenu btn = (RadContextMenu)(sender);
            string value = btn.SelectedValue;
            switch (value)
                //View PO
                case "1":
                //Send me a copy
                case "2":
                //Export CSV
                case "3":
                //Change status to printed
                case "4":
                    //   btnConfirmYes.CommandArgument = "Change to Printed";
                //Delete po
                case "5":
                    //    btnConfirmYes.CommandArgument = "Delete PO";
                    // deletePO();


    Thanks in advance, its driving me crazy as it hits the mpeConfirm.show() event but never shows. (CSS not included)

  2. Paul
    Paul avatar
    6 posts
    Member since:
    Sep 2018

    Posted 20 Feb 2019 Link to this post


    Weirdly, recreating the modal popup with different control names fixed the issue and all working.

Back to Top