Ajax-enabled RadMenu as context menu in RadGrid with out using the GridEditCommandColumn

2 posts, 0 answers
  1. Zeo
    Zeo avatar
    4 posts
    Member since:
    Oct 2006

    Posted 23 Aug 2007 Link to this post


    RadControls version

    RadGrid 4.6.0
    RadMenu 4.3.0
    RadAjax 1.7.0

    .NET version


    Visual Studio version


    programming language


    browser support

    all browsers supported by RadControls

    Use an Ajax-enabled RadMenu as context menu in RadGrid with out using the GridEditCommandColumn

    This code library extends the approach demonstrated in the Ajax-enabled RadMenu as context menu in RadGrid knowledge base article using only the RadMenu for the Add / Edit, Save / Cancel functionality.
    In numerous cases you may want to display a context menu when right-clicking an arbitrary row in RadGrid. Through a command from that context menu you may want to change the state for the grid row (for example edit/delete/add/save/cancel). Furthermore, you may prefer the operation with asynchronous request instead of postback.

    Basically what we do is:
    • First, we need to display the RadMenu in the to-be-inserted row, we can do that adding an Attribute to the insert row in the PreRender event of the RadGrid.
    • Second we consume the client event OnRowContextMenu and based on the index and the ItemType property of the RadGridTableRow object we show or hide the RadMenuItems (when the index is -1 we are talking about a insert row)
    • Finally, inside the handler (the ItemClick event handler of RadMenu) perform the corresponding task chosen by the user to modify the item state
  2. Sebastian
    Sebastian avatar
    9934 posts

    Posted 27 Aug 2007 Link to this post

    Hello Zeo,

    Thank you for posting this enhanced version of the knowledge base article in this code library thread. I have added 2500 Telerik points to your account for sharing it with the rest of Telerik community.

    And keep posting ;)

    Best regards,


    the Telerik team

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

This Code Library is part of the product documentation and subject to the respective product license agreement.