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

[Solved] Find cell by mouse?

2 Answers 81 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
derrick
Top achievements
Rank 2
derrick asked on 22 Sep 2009, 08:35 PM
Hi,

I'd like to implement context menus by only calling .SetContextMenu() once against the entire grid.  (Rather than having to attach it to each and every cell).  For me to do that I'd have to be able to determine what cell was clicked, and I wonder how difficult that would be?  (i.e. something like a HitTest method).  Should I just forget it and attach the context menu in the RowLoaded event like in the sample?

Thank you,

Derrick

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 23 Sep 2009, 06:53 AM
Hi Derrick,

You can use GetClickedElement<> method of RadContextMenu. Please check the attached example for more info.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
derrick
Top achievements
Rank 2
answered on 23 Sep 2009, 02:10 PM
Perfect.  Thank you so much.  :)
Tags
GridView
Asked by
derrick
Top achievements
Rank 2
Answers by
Vlad
Telerik team
derrick
Top achievements
Rank 2
Share this question
or