How to determine what called RadContextMenu?

2 posts, 0 answers
  1. Bill
    Bill avatar
    4 posts
    Member since:
    Mar 2009

    Posted 23 Jun 2009 Link to this post

    I have multiple buttons on a page that all call the same RadContextMenu: 




    <button id="btnOne" runat="server" class="button" onclick="showMenu(event)">Process</button> 
    <button id="btnTwo" runat="server" class="button" onclick="showMenu(event)">Process</button> 
    <Telerik:RadContextMenu id="RadContextMenu1" runat="server" Skin="WebBlue" OnItemClick="RadContextMenu1_ItemClick" >   
    <Telerik:RadMenuItem Text="Accept" runat="server" />   
    <Telerik:RadMenuItem Text="Reject" runat="server" />   




    In the server side code:



    protected void RadContextMenu1_ItemClick(object sender, RadMenuEventArgs e)      



  can I find out which button's menu was actually clicked?







  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 24 Jun 2009 Link to this post

    Hi Bill,

    In the ShowMenu() function you can easily determine which button is clicked. See the client side code below.

    <script type="text/javascript">  
    function showMenu(e)  
        alert(; // Id of clicked button  
        //Show menu  
    Note: You can set the value to a HiddenField control if you want to access it in server side.

  3. DevCraft R3 2016 release webinar banner
Back to Top