Trying to use the ContextMenu with the ListBox

2 posts, 0 answers
  1. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 08 Sep 2014 Link to this post

    I'm using the RadListBox as is shown in the screenshot.  Through JavaScript I'm able to correctly distinguish between single and double left clicks.

    Looking at my code (about a year old now), I see that I had tried introducing the RadContextMenu to the RadListBox but had disabled it.  I don't think it was quite working ideally.  But my client is hoping I could introduce a context menu.   Essentially what I'd like the user to be able to do is right click over top of any of the RadListBox items and a simple context menu appear.  The *problem* is that I don't know know how to determine which RadListBox item is being right clicked upon.

    It's important to understand that I do NOT want to force the user to first left click a RadListBox item.  They should just be able to immediately right click over top of it.

    So how do I determine which RadListBox item they're right clicking over top of?

  2. Nencho
    Nencho avatar
    1855 posts

    Posted 11 Sep 2014 Link to this post

    Hello Robert,

    I would suggest you to refer to the following documentation article, demonstrating the implementation of the desired functionality:

    The example demonstrates how you could handle the OnClientContextMenu client-side event of the RadListBox is handled, in order to display the RadContextMenu.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top