This is a migrated thread and some comments may be shown as answers.

Trying to use the ContextMenu with the ListBox

1 Answer 109 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 09 Sep 2014, 12:24 AM
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?

Robert

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 11 Sep 2014, 01:28 PM
Hello Robert,

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

http://www.telerik.com/help/aspnet-ajax/listbox-contextmenu-integration.html

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

Regards,
Nencho
Telerik
 

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.

 
Tags
ListBox
Asked by
Robert
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or