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

Focus cell clicked by mouse

1 Answer 148 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 27 Aug 2015, 09:11 PM

After adding a handler, the next step is to set focus to the cell (if any) under the mouse click.

this.AddHandler(MouseLeftButtonDownEvent, new MouseButtonEventHandler(this.myRadGridView_MouseDown), true);

I can set the cell focus given row and column.

The goal is to find the UIElement under the mouse click, if any, and then attempt to set Focus to it.

Thank you for your assistance.

1 Answer, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 01 Sep 2015, 08:30 AM
Hello Roger,

It sounds like you're trying to trigger editing of a cell when clicking on it, is that correct? In that case, a much simpler approach would be to set the EditTriggers property of RadGridView.
<telerik:RadGridView x:Name="radGridView1" EditTriggers="CellClick" />

If this is not what you're trying to achieve, could you please provide some details on your ultimate goal? This will help us advise you on the best approach that you can adopt.

Regards,
Petya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Roger
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or