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

RadListView select item on right click

1 Answer 72 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Vladimir
Top achievements
Rank 1
Vladimir asked on 01 Jun 2012, 11:47 AM
Hi

Is there any way to select an item in RadListView on right mouse click?? I use this demo http://demos.telerik.com/aspnet-ajax/listview/examples/client/webservicedatabinding/defaultcs.aspx to populate the ListView, but the right click always shows me the browsers contextMenu.

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Tsvetina
Telerik team
answered on 06 Jun 2012, 08:12 AM
Hi Vitalij,

You can wrap the client ItemTemplate in a <div> and attach its oncontextmenu javascript event. Once you do so, call the toggleSelection(index) method of the listview and then return false from the event handler function, so that the default browser menu is not shown.  

Kind regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListView
Asked by
Vladimir
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or